Skip to main content

Transferable

Trait Transferable 

Source
pub(crate) trait Transferable: DomObject + MarkedAsTransferableInIdl
where Self: Sized,
{ type Index: Copy + Eq + Hash; type Data; // Required methods fn transfer( &self, cx: &mut JSContext, ) -> Fallible<(NamespaceIndex<Self::Index>, Self::Data)>; fn transfer_receive( cx: &mut JSContext, owner: &GlobalScope, id: NamespaceIndex<Self::Index>, serialized: Self::Data, ) -> Result<DomRoot<Self>, ()>; fn serialized_storage<'a>( data: StructuredData<'a, '_>, ) -> &'a mut Option<FxHashMap<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".

Implementors§