Enum mozjs::jsapi::JS::TransferableOwnership
source · #[repr(u32)]pub enum TransferableOwnership {
SCTAG_TMO_UNFILLED = 0,
SCTAG_TMO_UNOWNED = 1,
SCTAG_TMO_FIRST_OWNED = 2,
SCTAG_TMO_MAPPED_DATA = 3,
SCTAG_TMO_CUSTOM = 4,
SCTAG_TMO_USER_MIN = 5,
}
Expand description
Values used to describe the ownership individual Transferables.
Note that these can show up in DifferentProcess clones, since DifferentProcess ArrayBuffers can be Transferred. In that case, this will distinguish the specific ownership mechanism: is it a malloc pointer or a memory mapping?
Variants§
SCTAG_TMO_UNFILLED = 0
Transferable data has not been filled in yet.
SCTAG_TMO_UNOWNED = 1
Structured clone buffer does not yet own the data.
SCTAG_TMO_FIRST_OWNED = 2
All enum values at least this large are owned by the clone buffer.
SCTAG_TMO_MAPPED_DATA = 3
Data is a memory mapped pointer.
SCTAG_TMO_CUSTOM = 4
Data is embedding-specific. The engine can free it by calling the freeTransfer op.
SCTAG_TMO_USER_MIN = 5
Same as SCTAG_TMO_CUSTOM, but the embedding can also use SCTAG_TMO_USER_MIN and greater, up to 2^32-1, to distinguish specific ownership variants.
Implementations§
source§impl TransferableOwnership
impl TransferableOwnership
pub const SCTAG_TMO_ALLOC_DATA: TransferableOwnership = TransferableOwnership::SCTAG_TMO_FIRST_OWNED
Trait Implementations§
source§impl Clone for TransferableOwnership
impl Clone for TransferableOwnership
source§fn clone(&self) -> TransferableOwnership
fn clone(&self) -> TransferableOwnership
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TransferableOwnership
impl Debug for TransferableOwnership
source§impl Hash for TransferableOwnership
impl Hash for TransferableOwnership
source§impl PartialEq for TransferableOwnership
impl PartialEq for TransferableOwnership
impl Copy for TransferableOwnership
impl Eq for TransferableOwnership
impl StructuralPartialEq for TransferableOwnership
Auto Trait Implementations§
impl Freeze for TransferableOwnership
impl RefUnwindSafe for TransferableOwnership
impl Send for TransferableOwnership
impl Sync for TransferableOwnership
impl Unpin for TransferableOwnership
impl UnwindSafe for TransferableOwnership
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more