pub struct Relation {
pub from: SymbolId,
pub to: SymbolId,
pub kind: RelationKind,
pub confidence: Confidence,
}Expand description
A directed, typed edge between two symbols.
Ordering is derived field by field, which is what makes relation sets in a
Codebase iterate deterministically.
Fields§
§from: SymbolIdSource symbol.
to: SymbolIdTarget symbol (may be external).
kind: RelationKindEdge kind.
confidence: ConfidenceResolution confidence.
Implementations§
Source§impl Relation
impl Relation
Sourcepub fn new(
from: SymbolId,
to: SymbolId,
kind: RelationKind,
confidence: Confidence,
) -> Self
pub fn new( from: SymbolId, to: SymbolId, kind: RelationKind, confidence: Confidence, ) -> Self
Construct a relation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Relation
impl<'de> Deserialize<'de> for Relation
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 Eq for Relation
Source§impl Ord for Relation
impl Ord for Relation
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Relation
impl PartialOrd for Relation
impl StructuralPartialEq for Relation
Auto Trait Implementations§
impl Freeze for Relation
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnsafeUnpin for Relation
impl UnwindSafe for Relation
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