pub struct ObjectHeader {
pub shape: ShapeId,
pub slots_start: u32,
pub elements_start: u32,
pub payload: u32,
pub slots_log: u8,
pub elements_log: u8,
pub kind: ObjectKind,
pub flags: u8,
}Expand description
One fixed-size record per object (20 bytes).
Fields§
§shape: ShapeId§slots_start: u32§elements_start: u32§payload: u32Index into the kind’s side arena, or an inline payload: the array length, the parent scope.
slots_log: u8§elements_log: u8§kind: ObjectKind§flags: u8Implementations§
Source§impl ObjectHeader
impl ObjectHeader
pub fn new( kind: ObjectKind, shape: ShapeId, slots: Range, elements: Range, payload: u32, flags: u8, ) -> Self
Sourcepub fn slots(&self) -> Range
pub fn slots(&self) -> Range
The named property slots: always a power of two
(ValueHeap::alloc_slots).
pub fn set_slots(&mut self, range: Range)
pub fn elements(&self) -> Range
pub fn set_elements(&mut self, range: Range)
pub fn has(&self, flag: u8) -> bool
Trait Implementations§
Source§impl Clone for ObjectHeader
impl Clone for ObjectHeader
impl Copy for ObjectHeader
Source§impl Debug for ObjectHeader
impl Debug for ObjectHeader
Auto Trait Implementations§
impl Freeze for ObjectHeader
impl RefUnwindSafe for ObjectHeader
impl Send for ObjectHeader
impl Sync for ObjectHeader
impl Unpin for ObjectHeader
impl UnsafeUnpin for ObjectHeader
impl UnwindSafe for ObjectHeader
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