#[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, cache-line friendly representation of a node.
This struct is exactly 32 bytes and is used for the primary node storage. Properties and labels are stored separately for flexibility. 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
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