Struct Symbol
pub struct Symbol {
pub data_type: AstType,
/* private fields */
}Expand description
Metadata about a symbol.
Fields§
§data_type: AstTypeImplementations§
§impl Symbol
impl Symbol
pub fn kind(&self) -> SymbolKind
pub fn kind(&self) -> SymbolKind
The kind of symbol.
pub fn declared_name(&self) -> String
pub fn declared_name(&self) -> String
The name of the symbol as it was declared in the source code.
pub fn has_linkage(&self) -> bool
pub fn has_linkage(&self) -> bool
Does the symbol have internal or external linkage?
pub fn linkage(&self) -> AstLinkage
pub fn linkage(&self) -> AstLinkage
The symbol’s linkage.
pub fn storage_duration(&self) -> AstStorageDuration
pub fn storage_duration(&self) -> AstStorageDuration
The symbol’s storage duration.
pub fn is_defined(&self) -> bool
pub fn is_defined(&self) -> bool
Is the symbol defined?
pub fn location(&self) -> SourceLocation
pub fn location(&self) -> SourceLocation
The source location of the symbol’s declaration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
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