pub struct RelationshipEdge {
pub from_id: GraphEntityId,
pub to_id: GraphEntityId,
pub relationship_type: RelationshipType,
pub strength: f64,
pub start_date: NaiveDate,
pub end_date: Option<NaiveDate>,
pub attributes: HashMap<String, String>,
pub strength_components: Option<StrengthComponents>,
}Expand description
Edge in the entity graph representing a relationship.
Fields§
§from_id: GraphEntityIdSource entity ID
to_id: GraphEntityIdTarget entity ID
relationship_type: RelationshipTypeRelationship type
strength: f64Relationship strength (0.0 to 1.0)
start_date: NaiveDateRelationship start date
end_date: Option<NaiveDate>Relationship end date (if terminated)
attributes: HashMap<String, String>Edge attributes
strength_components: Option<StrengthComponents>Strength components (for analysis)
Implementations§
Source§impl RelationshipEdge
impl RelationshipEdge
Sourcepub fn new(
from_id: GraphEntityId,
to_id: GraphEntityId,
relationship_type: RelationshipType,
start_date: NaiveDate,
) -> Self
pub fn new( from_id: GraphEntityId, to_id: GraphEntityId, relationship_type: RelationshipType, start_date: NaiveDate, ) -> Self
Create a new relationship edge.
Sourcepub fn with_strength(self, strength: f64) -> Self
pub fn with_strength(self, strength: f64) -> Self
Set relationship strength.
Sourcepub fn with_strength_components(self, components: StrengthComponents) -> Self
pub fn with_strength_components(self, components: StrengthComponents) -> Self
Set strength with components.
Trait Implementations§
Source§impl Clone for RelationshipEdge
impl Clone for RelationshipEdge
Source§fn clone(&self) -> RelationshipEdge
fn clone(&self) -> RelationshipEdge
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 RelationshipEdge
impl Debug for RelationshipEdge
Source§impl<'de> Deserialize<'de> for RelationshipEdge
impl<'de> Deserialize<'de> for RelationshipEdge
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
Auto Trait Implementations§
impl Freeze for RelationshipEdge
impl RefUnwindSafe for RelationshipEdge
impl Send for RelationshipEdge
impl Sync for RelationshipEdge
impl Unpin for RelationshipEdge
impl UnwindSafe for RelationshipEdge
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