pub struct SymbolReference { /* private fields */ }Expand description
One reference site inside one resolution unit.
Two identical path texts at two locations are two references: the span, not the text, is the site’s identity.
Implementations§
Source§impl SymbolReference
impl SymbolReference
Sourcepub fn id(&self) -> ReferenceId
pub fn id(&self) -> ReferenceId
This reference’s identifier.
Sourcepub fn unit(&self) -> ResolutionUnitId
pub fn unit(&self) -> ResolutionUnitId
The unit this reference occurs in.
Sourcepub fn kind(&self) -> ReferenceKind
pub fn kind(&self) -> ReferenceKind
What kind of reference this is.
Sourcepub fn span(&self) -> &SourceSpan
pub fn span(&self) -> &SourceSpan
Where the reference sits in the snapshotted source.
Sourcepub fn enclosing_definition(&self) -> Option<DefinitionId>
pub fn enclosing_definition(&self) -> Option<DefinitionId>
The definition this reference occurs inside, in the same unit.
Trait Implementations§
Source§impl Clone for SymbolReference
impl Clone for SymbolReference
Source§fn clone(&self) -> SymbolReference
fn clone(&self) -> SymbolReference
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SymbolReference
impl Debug for SymbolReference
Source§impl<'de> Deserialize<'de> for SymbolReference
impl<'de> Deserialize<'de> for SymbolReference
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 SymbolReference
Source§impl PartialEq for SymbolReference
impl PartialEq for SymbolReference
Source§impl Serialize for SymbolReference
impl Serialize for SymbolReference
impl StructuralPartialEq for SymbolReference
Auto Trait Implementations§
impl Freeze for SymbolReference
impl RefUnwindSafe for SymbolReference
impl Send for SymbolReference
impl Sync for SymbolReference
impl Unpin for SymbolReference
impl UnsafeUnpin for SymbolReference
impl UnwindSafe for SymbolReference
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