pub enum Kind {
Bytes,
Value,
}Expand description
What a block holds, as stored in the header word.
The kind shares its word with the size because the only other free slot is +4, and
that one belongs to ref_count. Value blocks take the low bit; byte blocks take the
low two bits as zero and shift the size up, so a fresh js_malloc(0) cannot be
mistaken for a box.
Variants§
Trait Implementations§
impl Copy for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Forget for Kind
impl Freeze for Kind
impl Move for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnsafeUnpin for Kind
impl UnwindSafe for Kind
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