script::dom::bindings::transferable

Trait Transferable

Source
pub(crate) trait Transferable: DomObject
where Self: Sized,
{ type Index: Copy + Eq + Hash; type Data; // Required methods fn transfer(&self) -> Fallible<(NamespaceIndex<Self::Index>, Self::Data)>; fn transfer_receive( owner: &GlobalScope, id: NamespaceIndex<Self::Index>, serialized: Self::Data, ) -> Result<DomRoot<Self>, ()>; fn serialized_storage<'a>( data: StructuredData<'a, '_>, ) -> &'a mut Option<HashMap<NamespaceIndex<Self::Index>, Self::Data>>; // Provided method fn can_transfer(&self) -> bool { ... } }

Required Associated Types§

Required Methods§

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§