pub struct Symbol {
pub name: String,
pub kind: SymbolKind,
pub file: FileId,
pub decl: Option<(u32, u32)>,
pub scope: ScopeId,
pub params: Vec<String>,
pub type_annotation: Option<String>,
pub container: Option<SymbolId>,
pub type_ref: Option<SymbolId>,
pub exported: bool,
pub module: Option<ScopeId>,
}Expand description
A declared name and what is known about it at its declaration.
Fields§
§name: String§kind: SymbolKind§file: FileId§decl: Option<(u32, u32)>§scope: ScopeId§params: Vec<String>§type_annotation: Option<String>§container: Option<SymbolId>The type/enum this symbol is a member (field or enum case) of. A member
is reached as owner.member, so it is not in any scope’s resolution list.
type_ref: Option<SymbolId>For a variable of a user-defined type, that type’s symbol, so v.field
resolves. Set from an annotation or a Type.new() initializer.
exported: bool§module: Option<ScopeId>For an import alias, the imported library’s global scope.
Trait Implementations§
impl StructuralPartialEq for Symbol
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnsafeUnpin 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