pub(crate) trait Transferable: DomObject + MarkedAsTransferableInIdlwhere
    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<FxHashMap<NamespaceIndex<Self::Index>, Self::Data>>;
    // Provided method
    fn can_transfer(&self) -> bool { ... }
}Required Associated Types§
Required Methods§
Sourcefn transfer_receive(
    owner: &GlobalScope,
    id: NamespaceIndex<Self::Index>,
    serialized: Self::Data,
) -> Result<DomRoot<Self>, ()>
 
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<FxHashMap<NamespaceIndex<Self::Index>, Self::Data>>
Provided Methods§
fn can_transfer(&self) -> bool
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.