pub struct ClassId(/* private fields */);Expand description
The id a host class is registered under: what JS_NewClassID hands out.
Zero means “no class” (JS_INVALID_CLASS_ID), which is why allocation starts at one:
JS_GetOpaque(val, 0) has to match nothing, or every object in the realm would answer
for a class that was never registered.
Implementations§
Trait Implementations§
impl Copy for ClassId
impl Eq for ClassId
Source§impl Ord for ClassId
impl Ord for ClassId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ClassId
impl PartialOrd for ClassId
impl StructuralPartialEq for ClassId
Auto Trait Implementations§
impl Forget for ClassId
impl Freeze for ClassId
impl Move for ClassId
impl RefUnwindSafe for ClassId
impl Send for ClassId
impl Sync for ClassId
impl Unpin for ClassId
impl UnsafeUnpin for ClassId
impl UnwindSafe for ClassId
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