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§

Object Safety§

This trait is not object safe.

Implementors§