#[repr(C)]pub struct EdgeRecord {
pub id: EdgeId,
pub src: NodeId,
pub dst: NodeId,
pub type_id: u32,
pub props_offset: u32,
pub props_count: u16,
pub flags: EdgeFlags,
pub epoch: EpochId,
}Expand description
The compact representation of an edge.
This struct is used for edge storage with minimal overhead.
Fields§
§id: EdgeIdUnique edge identifier.
src: NodeIdSource node ID.
dst: NodeIdDestination node ID.
type_id: u32Edge type ID (index into type table).
props_offset: u32Offset into the property arena.
props_count: u16Number of properties.
flags: EdgeFlagsFlags (deleted, has_version, etc.).
epoch: EpochIdEpoch this record was created in.
Implementations§
Source§impl EdgeRecord
impl EdgeRecord
Sourcepub const FLAG_DELETED: u16
pub const FLAG_DELETED: u16
Flag indicating the edge is deleted.
Sourcepub const FLAG_HAS_VERSION: u16
pub const FLAG_HAS_VERSION: u16
Flag indicating the edge has version history.
Sourcepub const fn new(
id: EdgeId,
src: NodeId,
dst: NodeId,
type_id: u32,
epoch: EpochId,
) -> Self
pub const fn new( id: EdgeId, src: NodeId, dst: NodeId, type_id: u32, epoch: EpochId, ) -> Self
Creates a new edge record.
Sourcepub const fn is_deleted(&self) -> bool
pub const fn is_deleted(&self) -> bool
Checks if this edge is deleted.
Sourcepub fn set_deleted(&mut self, deleted: bool)
pub fn set_deleted(&mut self, deleted: bool)
Marks this edge as deleted.
Trait Implementations§
Source§impl Clone for EdgeRecord
impl Clone for EdgeRecord
Source§fn clone(&self) -> EdgeRecord
fn clone(&self) -> EdgeRecord
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 EdgeRecord
impl Debug for EdgeRecord
impl Copy for EdgeRecord
Auto Trait Implementations§
impl Freeze for EdgeRecord
impl RefUnwindSafe for EdgeRecord
impl Send for EdgeRecord
impl Sync for EdgeRecord
impl Unpin for EdgeRecord
impl UnwindSafe for EdgeRecord
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