pub struct RelationOccurrence { /* private fields */ }Expand description
One exact source occurrence supporting a logical relationship.
Implementations§
Source§impl RelationOccurrence
impl RelationOccurrence
Sourcepub fn new(
relation: &LogicalRelation,
file: RepositoryFilePath,
span: SourceSpan,
generation: IndexGeneration,
) -> Result<Self, GraphContractError>
pub fn new( relation: &LogicalRelation, file: RepositoryFilePath, span: SourceSpan, generation: IndexGeneration, ) -> Result<Self, GraphContractError>
Construct one source occurrence for a logical relation.
§Errors
Returns an error when the occurrence and relation generations differ.
Sourcepub const fn relation(&self) -> &LogicalRelationKey
pub const fn relation(&self) -> &LogicalRelationKey
Borrow the supported logical-relation key.
Sourcepub const fn file(&self) -> &RepositoryFilePath
pub const fn file(&self) -> &RepositoryFilePath
Borrow the repository-local source file.
Sourcepub const fn span(&self) -> SourceSpan
pub const fn span(&self) -> SourceSpan
Return the exact supporting source span.
Sourcepub const fn generation(&self) -> IndexGeneration
pub const fn generation(&self) -> IndexGeneration
Return the complete generation containing this occurrence.
Trait Implementations§
Source§impl Clone for RelationOccurrence
impl Clone for RelationOccurrence
Source§fn clone(&self) -> RelationOccurrence
fn clone(&self) -> RelationOccurrence
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 RelationOccurrence
impl Debug for RelationOccurrence
Source§impl PartialEq for RelationOccurrence
impl PartialEq for RelationOccurrence
Source§impl Serialize for RelationOccurrence
impl Serialize for RelationOccurrence
impl Eq for RelationOccurrence
impl StructuralPartialEq for RelationOccurrence
Auto Trait Implementations§
impl Freeze for RelationOccurrence
impl RefUnwindSafe for RelationOccurrence
impl Send for RelationOccurrence
impl Sync for RelationOccurrence
impl Unpin for RelationOccurrence
impl UnwindSafe for RelationOccurrence
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.