Trait script::dom::bindings::serializable::Serializable
source · pub trait Serializable: DomObject {
// Required methods
fn serialize(
&self,
sc_holder: &mut StructuredDataHolder,
) -> Result<StorageKey, ()>;
fn deserialize(
owner: &GlobalScope,
sc_holder: &mut StructuredDataHolder,
extra_data: StorageKey,
can_gc: CanGc,
) -> Result<(), ()>;
}
Expand description
Interface for serializable platform objects. https://html.spec.whatwg.org/multipage/#serializable
Required Methods§
sourcefn serialize(
&self,
sc_holder: &mut StructuredDataHolder,
) -> Result<StorageKey, ()>
fn serialize( &self, sc_holder: &mut StructuredDataHolder, ) -> Result<StorageKey, ()>
sourcefn deserialize(
owner: &GlobalScope,
sc_holder: &mut StructuredDataHolder,
extra_data: StorageKey,
can_gc: CanGc,
) -> Result<(), ()>
fn deserialize( owner: &GlobalScope, sc_holder: &mut StructuredDataHolder, extra_data: StorageKey, can_gc: CanGc, ) -> Result<(), ()>
Object Safety§
This trait is not object safe.