Type Alias script::dom::bindings::import::module::jsapi::FreeTransferStructuredCloneOp

source ·
pub type FreeTransferStructuredCloneOp = Option<unsafe extern "C" fn(_: u32, _: TransferableOwnership, _: *mut c_void, _: u64, _: *mut c_void)>;
Expand description

Called when freeing a transferable handled by the embedding. Note that it should never trigger a garbage collection (and will assert in a debug build if it does.)

This callback will be used to release ownership in three situations:

  1. During serialization: an object is Transferred from, then an error is encountered later and the incomplete serialization is discarded.

  2. During deserialization: before an object is Transferred to, an error is encountered and the incompletely deserialized clone is discarded.

  3. Serialized data that includes Transferring is never deserialized (eg when the receiver disappears before reading in the message), and the clone data is destroyed.

Aliased Type§

enum FreeTransferStructuredCloneOp {
    None,
    Some(unsafe extern "C" fn(_: u32, _: TransferableOwnership, _: *mut c_void, _: u64, _: *mut c_void)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: u32, _: TransferableOwnership, _: *mut c_void, _: u64, _: *mut c_void))

Some value of type T.