pub struct SymbolDefinition { /* private fields */ }Expand description
One definition site inside one resolution unit.
Implementations§
Source§impl SymbolDefinition
impl SymbolDefinition
Sourcepub fn id(&self) -> DefinitionId
pub fn id(&self) -> DefinitionId
This definition’s identifier.
Sourcepub fn unit(&self) -> ResolutionUnitId
pub fn unit(&self) -> ResolutionUnitId
The unit this definition is declared in.
Sourcepub fn kind(&self) -> SymbolKind
pub fn kind(&self) -> SymbolKind
What kind of definition this is.
Sourcepub fn span(&self) -> &SourceSpan
pub fn span(&self) -> &SourceSpan
Where the definition sits in the snapshotted source.
Sourcepub fn parent(&self) -> Option<DefinitionId>
pub fn parent(&self) -> Option<DefinitionId>
The definition that lexically owns this one, in the same unit.
Trait Implementations§
Source§impl Clone for SymbolDefinition
impl Clone for SymbolDefinition
Source§fn clone(&self) -> SymbolDefinition
fn clone(&self) -> SymbolDefinition
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 SymbolDefinition
impl Debug for SymbolDefinition
Source§impl<'de> Deserialize<'de> for SymbolDefinition
impl<'de> Deserialize<'de> for SymbolDefinition
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 SymbolDefinition
Source§impl PartialEq for SymbolDefinition
impl PartialEq for SymbolDefinition
Source§impl Serialize for SymbolDefinition
impl Serialize for SymbolDefinition
impl StructuralPartialEq for SymbolDefinition
Auto Trait Implementations§
impl Freeze for SymbolDefinition
impl RefUnwindSafe for SymbolDefinition
impl Send for SymbolDefinition
impl Sync for SymbolDefinition
impl Unpin for SymbolDefinition
impl UnsafeUnpin for SymbolDefinition
impl UnwindSafe for SymbolDefinition
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