pub struct Edge {
pub edge_id: EdgeId,
pub edge_type: EdgeType,
pub participants: Vec<EdgeParticipant>,
pub weight: Option<f32>,
pub trajectory_id: Option<TrajectoryId>,
pub provenance: Provenance,
pub created_at: Timestamp,
pub metadata: Option<Value>,
}Expand description
Edge - graph relationship between entities. Supports both binary edges (A→B) and hyperedges (N-ary relationships).
Fields§
§edge_id: EdgeId§edge_type: EdgeType§participants: Vec<EdgeParticipant>Participants in this edge (len=2 for binary, len>2 for hyperedge)
weight: Option<f32>Optional relationship strength [0.0, 1.0]
trajectory_id: Option<TrajectoryId>Optional trajectory context
provenance: ProvenanceHow this edge was created
created_at: Timestamp§metadata: Option<Value>Implementations§
Source§impl Edge
impl Edge
Sourcepub fn is_hyperedge(&self) -> bool
pub fn is_hyperedge(&self) -> bool
Check if this is a hyperedge (more than 2 participants)
Sourcepub fn participants_with_role(&self, role: &str) -> Vec<&EdgeParticipant>
pub fn participants_with_role(&self, role: &str) -> Vec<&EdgeParticipant>
Get participants with a specific role
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Edge
impl<'de> Deserialize<'de> for Edge
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
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