pub struct SymbolIndex { /* private fields */ }Implementations§
Source§impl SymbolIndex
impl SymbolIndex
Sourcepub fn build(workspace: &Path) -> Self
pub fn build(workspace: &Path) -> Self
Walk all source files under workspace and build the index.
Sourcepub fn find(&self, query: &str, limit: usize) -> Vec<&Symbol>
pub fn find(&self, query: &str, limit: usize) -> Vec<&Symbol>
Find all symbols whose name contains query (case-insensitive).
Exact matches are returned first.
Sourcepub fn read_body(&self, name: &str) -> Option<String>
pub fn read_body(&self, name: &str) -> Option<String>
Read the source body of the first symbol matching name (exact, case-insensitive).
pub fn symbol_count(&self) -> usize
Auto Trait Implementations§
impl Freeze for SymbolIndex
impl RefUnwindSafe for SymbolIndex
impl Send for SymbolIndex
impl Sync for SymbolIndex
impl Unpin for SymbolIndex
impl UnsafeUnpin for SymbolIndex
impl UnwindSafe for SymbolIndex
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