#[repr(C)]pub struct NodeRecord {
pub id: NodeId,
pub label_bits: u64,
pub props_offset: u32,
pub props_count: u16,
pub flags: NodeFlags,
pub epoch: EpochId,
}Expand description
The compact, cache-line friendly representation of a node.
This struct is exactly 32 bytes and is used for the primary node storage. Properties are stored separately in columnar format.
Fields§
§id: NodeIdUnique node identifier.
label_bits: u64Bitmap of label IDs (supports up to 64 labels).
props_offset: u32Offset into the property arena.
props_count: u16Number of properties.
flags: NodeFlagsFlags (deleted, has_version, etc.).
epoch: EpochIdEpoch this record was created in.
Implementations§
Source§impl NodeRecord
impl NodeRecord
Sourcepub const FLAG_DELETED: u16
pub const FLAG_DELETED: u16
Flag indicating the node is deleted.
Sourcepub const FLAG_HAS_VERSION: u16
pub const FLAG_HAS_VERSION: u16
Flag indicating the node has version history.
Sourcepub const fn is_deleted(&self) -> bool
pub const fn is_deleted(&self) -> bool
Checks if this node is deleted.
Sourcepub fn set_deleted(&mut self, deleted: bool)
pub fn set_deleted(&mut self, deleted: bool)
Marks this node as deleted.
Sourcepub const fn has_label_bit(&self, bit: u8) -> bool
pub const fn has_label_bit(&self, bit: u8) -> bool
Checks if this node has a label by its bit index.
Sourcepub fn set_label_bit(&mut self, bit: u8)
pub fn set_label_bit(&mut self, bit: u8)
Sets a label bit.
Sourcepub fn clear_label_bit(&mut self, bit: u8)
pub fn clear_label_bit(&mut self, bit: u8)
Clears a label bit.
Sourcepub fn label_bits_iter(&self) -> impl Iterator<Item = u8> + '_
pub fn label_bits_iter(&self) -> impl Iterator<Item = u8> + '_
Returns an iterator over the set label bits.
Trait Implementations§
Source§impl Clone for NodeRecord
impl Clone for NodeRecord
Source§fn clone(&self) -> NodeRecord
fn clone(&self) -> NodeRecord
Returns a duplicate 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 NodeRecord
impl Debug for NodeRecord
impl Copy for NodeRecord
Auto Trait Implementations§
impl Freeze for NodeRecord
impl RefUnwindSafe for NodeRecord
impl Send for NodeRecord
impl Sync for NodeRecord
impl Unpin for NodeRecord
impl UnwindSafe for NodeRecord
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