pub struct CodeNavigator { /* private fields */ }
Expand description
Code navigator
Implementations§
pub fn new() -> Self
Sourcepub fn build_index(&mut self, symbols: &[SymbolInfo])
pub fn build_index(&mut self, symbols: &[SymbolInfo])
Build navigation index from symbols
Sourcepub fn goto_definition(&self, symbol_name: &str) -> Option<NavigationResult>
pub fn goto_definition(&self, symbol_name: &str) -> Option<NavigationResult>
Navigate to symbol definition
Sourcepub fn goto_position(&self, position: &Position) -> Option<NavigationResult>
pub fn goto_position(&self, position: &Position) -> Option<NavigationResult>
Navigate to symbol at position
Sourcepub fn find_references(&self, symbol_name: &str) -> Vec<ReferenceInfo>
pub fn find_references(&self, symbol_name: &str) -> Vec<ReferenceInfo>
Find all references to a symbol
Sourcepub fn get_symbol_at_position(&self, position: &Position) -> Option<&SymbolInfo>
pub fn get_symbol_at_position(&self, position: &Position) -> Option<&SymbolInfo>
Get symbol information at position
Sourcepub fn get_symbols_in_scope(&self, scope: Option<&str>) -> Vec<&SymbolInfo>
pub fn get_symbols_in_scope(&self, scope: Option<&str>) -> Vec<&SymbolInfo>
Get all symbols in scope
Sourcepub fn search_symbols(
&self,
pattern: &str,
kind_filter: Option<&[SymbolKind]>,
) -> Vec<&SymbolInfo>
pub fn search_symbols( &self, pattern: &str, kind_filter: Option<&[SymbolKind]>, ) -> Vec<&SymbolInfo>
Search for symbols by name pattern
Sourcepub fn goto_parent(
&self,
current_symbol: &SymbolInfo,
) -> Option<NavigationResult>
pub fn goto_parent( &self, current_symbol: &SymbolInfo, ) -> Option<NavigationResult>
Navigate to parent scope
Sourcepub fn goto_children(&self, symbol: &SymbolInfo) -> Vec<NavigationResult>
pub fn goto_children(&self, symbol: &SymbolInfo) -> Vec<NavigationResult>
Navigate to child symbols
Auto Trait Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more