pub struct SymbolScope {
pub symbols: Vec<Symbol>,
pub parent: Option<Box<SymbolScope>>,
pub start_line: u32,
pub end_line: u32,
}Expand description
Symbol scope information
Fields§
§symbols: Vec<Symbol>Symbols in this scope
parent: Option<Box<SymbolScope>>Parent scope (for nested scopes)
start_line: u32Scope range (start and end positions)
end_line: u32Implementations§
Source§impl SymbolScope
impl SymbolScope
Sourcepub fn add_symbol(&mut self, symbol: Symbol)
pub fn add_symbol(&mut self, symbol: Symbol)
Add a symbol to this scope
Sourcepub fn find_symbol_at_position(&self, position: Position) -> Option<Symbol>
pub fn find_symbol_at_position(&self, position: Position) -> Option<Symbol>
Find symbol at position in this scope
Sourcepub fn get_visible_symbols(&self, position: Position) -> Vec<Symbol>
pub fn get_visible_symbols(&self, position: Position) -> Vec<Symbol>
Get all symbols visible at position (including parent scopes)
Trait Implementations§
Source§impl Clone for SymbolScope
impl Clone for SymbolScope
Source§fn clone(&self) -> SymbolScope
fn clone(&self) -> SymbolScope
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 moreAuto Trait Implementations§
impl Freeze for SymbolScope
impl RefUnwindSafe for SymbolScope
impl Send for SymbolScope
impl Sync for SymbolScope
impl Unpin for SymbolScope
impl UnwindSafe for SymbolScope
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