pub struct StoredEdge {
pub edge_type: EdgeType,
pub weight: f32,
pub created_at: Timestamp,
pub valid_from: Option<Timestamp>,
pub valid_until: Option<Timestamp>,
}Expand description
Compact edge data stored in CSR/CSC arrays.
Fields§
§edge_type: EdgeTypeThe relationship type.
weight: f32Edge weight (0.0 to 1.0).
created_at: TimestampWhen this edge was created.
valid_from: Option<Timestamp>When this relationship became valid. None = since creation.
valid_until: Option<Timestamp>When this relationship stopped being valid. None = still valid.
Implementations§
Source§impl StoredEdge
impl StoredEdge
Sourcepub fn from_memory_edge(edge: &MemoryEdge) -> Self
pub fn from_memory_edge(edge: &MemoryEdge) -> Self
Converts a MemoryEdge into a compact stored representation.
Sourcepub fn is_valid_at(&self, at: Timestamp) -> bool
pub fn is_valid_at(&self, at: Timestamp) -> bool
Returns true if this edge is temporally valid at the given timestamp.
Sourcepub fn is_invalidated(&self) -> bool
pub fn is_invalidated(&self) -> bool
Returns true if this edge has been invalidated.
Trait Implementations§
Source§impl Clone for StoredEdge
impl Clone for StoredEdge
Source§fn clone(&self) -> StoredEdge
fn clone(&self) -> StoredEdge
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 StoredEdge
impl Debug for StoredEdge
Source§impl<'de> Deserialize<'de> for StoredEdge
impl<'de> Deserialize<'de> for StoredEdge
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StoredEdge
impl PartialEq for StoredEdge
Source§impl Serialize for StoredEdge
impl Serialize for StoredEdge
impl Copy for StoredEdge
impl StructuralPartialEq for StoredEdge
Auto Trait Implementations§
impl Freeze for StoredEdge
impl RefUnwindSafe for StoredEdge
impl Send for StoredEdge
impl Sync for StoredEdge
impl Unpin for StoredEdge
impl UnsafeUnpin for StoredEdge
impl UnwindSafe for StoredEdge
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