pub enum StructMode {
Sparse,
Dense,
Packed,
}Expand description
How a struct’s fields are stored.
Variants§
Sparse
Presence bitmap + a fixed slot for every field, present or not (canonical kind byte 0). Best general default.
Dense
No bitmap; every field always present and mandatory (kind byte 2). Smallest and fastest for records with no optionality.
Packed
Presence bitmap + slots for present fields only, packed in size-class order (kind byte 3). Field offsets are recovered in O(1) with popcount rank queries over the bitmap — sparse-data sizes without per-object vtables and without giving up zero-copy. At most 64 fields.
Trait Implementations§
Source§impl Clone for StructMode
impl Clone for StructMode
Source§fn clone(&self) -> StructMode
fn clone(&self) -> StructMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StructMode
Source§impl Debug for StructMode
impl Debug for StructMode
impl Eq for StructMode
Source§impl PartialEq for StructMode
impl PartialEq for StructMode
impl StructuralPartialEq for StructMode
Auto Trait Implementations§
impl Freeze for StructMode
impl RefUnwindSafe for StructMode
impl Send for StructMode
impl Sync for StructMode
impl Unpin for StructMode
impl UnsafeUnpin for StructMode
impl UnwindSafe for StructMode
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