pub struct LogicalRelation { /* private fields */ }Expand description
One deduplicated source-kind-target relationship at a complete generation.
Implementations§
Source§impl LogicalRelation
impl LogicalRelation
Sourcepub fn new(
source: &GraphEntity,
kind: GraphRelationKind,
resolution: RelationResolution,
confidence: ConfidenceClass,
completeness: Completeness,
generation: IndexGeneration,
) -> Result<Self, GraphContractError>
pub fn new( source: &GraphEntity, kind: GraphRelationKind, resolution: RelationResolution, confidence: ConfidenceClass, completeness: Completeness, generation: IndexGeneration, ) -> Result<Self, GraphContractError>
Construct one logical relation and derive its stable key.
§Errors
Returns an error when the source or target belongs to another generation, a retained target belongs to another project, a reusable selector names a different entity, or the relation claims the zero generation.
Sourcepub const fn key(&self) -> &LogicalRelationKey
pub const fn key(&self) -> &LogicalRelationKey
Borrow the stable logical-relation key.
Sourcepub const fn source(&self) -> &GraphEntityKey
pub const fn source(&self) -> &GraphEntityKey
Borrow the source entity key.
Sourcepub const fn kind(&self) -> GraphRelationKind
pub const fn kind(&self) -> GraphRelationKind
Return the typed relation family.
Sourcepub const fn resolution(&self) -> &RelationResolution
pub const fn resolution(&self) -> &RelationResolution
Borrow the relation resolution state.
Sourcepub const fn confidence(&self) -> ConfidenceClass
pub const fn confidence(&self) -> ConfidenceClass
Return the coarse relation confidence.
Sourcepub const fn completeness(&self) -> Completeness
pub const fn completeness(&self) -> Completeness
Return the producer completeness for this relation.
Sourcepub const fn generation(&self) -> IndexGeneration
pub const fn generation(&self) -> IndexGeneration
Return the complete generation containing this relation.
Trait Implementations§
Source§impl Clone for LogicalRelation
impl Clone for LogicalRelation
Source§fn clone(&self) -> LogicalRelation
fn clone(&self) -> LogicalRelation
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 LogicalRelation
impl Debug for LogicalRelation
Source§impl PartialEq for LogicalRelation
impl PartialEq for LogicalRelation
Source§impl Serialize for LogicalRelation
impl Serialize for LogicalRelation
impl Eq for LogicalRelation
impl StructuralPartialEq for LogicalRelation
Auto Trait Implementations§
impl Freeze for LogicalRelation
impl RefUnwindSafe for LogicalRelation
impl Send for LogicalRelation
impl Sync for LogicalRelation
impl Unpin for LogicalRelation
impl UnwindSafe for LogicalRelation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.