pub struct WorkspaceIndex { /* private fields */ }Expand description
Workspace-wide index for fast symbol lookups
Implementations§
Source§impl WorkspaceIndex
impl WorkspaceIndex
Sourcepub fn new() -> WorkspaceIndex
pub fn new() -> WorkspaceIndex
Create a new empty workspace index
Sourcepub fn update_from_document(
&mut self,
uri: &str,
_content: &str,
symtab: &SymbolTable,
)
pub fn update_from_document( &mut self, uri: &str, _content: &str, symtab: &SymbolTable, )
Update the index with symbols from a document
Sourcepub fn remove_document(&mut self, uri: &str)
pub fn remove_document(&mut self, uri: &str)
Remove all symbols from a document
Sourcepub fn find_refs(&self, name: &str) -> Vec<SymbolDef>
pub fn find_refs(&self, name: &str) -> Vec<SymbolDef>
Find all references to a symbol (simplified version) In a full implementation, this would analyze usage sites
Sourcepub fn search_symbols(&self, query: &str) -> Vec<SymbolDef>
pub fn search_symbols(&self, query: &str) -> Vec<SymbolDef>
Get all symbols in the workspace matching a query
Sourcepub fn symbol_count(&self) -> usize
pub fn symbol_count(&self) -> usize
Get the total number of indexed symbols
Sourcepub fn file_count(&self) -> usize
pub fn file_count(&self) -> usize
Get the number of indexed files
Trait Implementations§
Source§impl Default for WorkspaceIndex
impl Default for WorkspaceIndex
Source§fn default() -> WorkspaceIndex
fn default() -> WorkspaceIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WorkspaceIndex
impl RefUnwindSafe for WorkspaceIndex
impl Send for WorkspaceIndex
impl Sync for WorkspaceIndex
impl Unpin for WorkspaceIndex
impl UnsafeUnpin for WorkspaceIndex
impl UnwindSafe for WorkspaceIndex
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