pub struct Edge {
pub source: Uuid,
pub edge_type: String,
pub target: Uuid,
pub is_active: bool,
pub weight: f32,
pub created_at: u64,
pub deleted_at: u64,
}Expand description
An edge in the graph with properties and temporal tracking.
Fields§
§source: UuidSource vertex ID
edge_type: StringEdge type (e.g., “follows”, “knows”, “contains”)
target: UuidTarget vertex ID
is_active: boolWhether this edge is active (vs passive/hidden/deleted)
weight: f32Edge weight or score
created_at: u64Creation timestamp in nanoseconds since Unix epoch
deleted_at: u64Deletion timestamp in nanoseconds since Unix epoch (0 if not deleted)
Implementations§
Source§impl Edge
impl Edge
Sourcepub fn new(
source: Uuid,
edge_type: impl Into<String>,
target: Uuid,
is_active: bool,
weight: f32,
) -> Self
pub fn new( source: Uuid, edge_type: impl Into<String>, target: Uuid, is_active: bool, weight: f32, ) -> Self
Creates a new edge with current timestamp
Sourcepub fn with_timestamps(
source: Uuid,
edge_type: impl Into<String>,
target: Uuid,
is_active: bool,
weight: f32,
created_at: u64,
deleted_at: u64,
) -> Self
pub fn with_timestamps( source: Uuid, edge_type: impl Into<String>, target: Uuid, is_active: bool, weight: f32, created_at: u64, deleted_at: u64, ) -> Self
Creates a new edge with explicit timestamps
Sourcepub fn is_active_at(&self, timestamp: u64) -> bool
pub fn is_active_at(&self, timestamp: u64) -> bool
Checks if this edge was active at the given timestamp
Trait Implementations§
impl StructuralPartialEq for Edge
Auto Trait Implementations§
impl Freeze for Edge
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnwindSafe for Edge
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