#[repr(C)]pub struct NodeRecord {
pub id: NodeId,
pub epoch: EpochId,
pub props_offset: u32,
pub label_count: u16,
pub _reserved: u16,
pub props_count: u16,
pub flags: NodeFlags,
pub _padding: u32,
}Expand description
The compact storage format for a node - exactly 32 bytes.
You won’t interact with this directly most of the time. It’s what lives in memory for each node, with properties and labels stored separately. The 32-byte size means two records fit in a cache line.
Fields are ordered to minimize padding: u64s first, then u32, then u16s.
Fields§
§id: NodeIdUnique node identifier.
epoch: EpochIdEpoch this record was created in.
props_offset: u32Offset into the property arena.
label_count: u16Number of labels on this node (labels stored externally).
_reserved: u16Reserved for future use / alignment.
props_count: u16Number of properties.
flags: NodeFlagsFlags (deleted, has_version, etc.).
_padding: u32Padding to maintain 32-byte size.
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 label_count(&self) -> u16
pub const fn label_count(&self) -> u16
Returns the number of labels on this node.
Sourcepub fn set_label_count(&mut self, count: u16)
pub fn set_label_count(&mut self, count: u16)
Sets the label count.
Trait Implementations§
Source§impl Clone for NodeRecord
impl Clone for NodeRecord
Source§fn clone(&self) -> NodeRecord
fn clone(&self) -> NodeRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more