pub struct WorkspaceIndex { /* private fields */ }Implementations§
Source§impl WorkspaceIndex
impl WorkspaceIndex
pub fn new() -> Self
Sourcepub fn scan_folder(&self, root: &Path)
pub fn scan_folder(&self, root: &Path)
Analyze every LOGOS file under root (bounded). Blocking — run it on
a blocking task.
Sourcepub fn index_file(&self, path: &Path)
pub fn index_file(&self, path: &Path)
(Re-)analyze one file into the index.
pub fn remove(&self, uri: &Url)
Sourcepub fn references_of(&self, name: &str, skip: &[&Url]) -> Vec<Location>
pub fn references_of(&self, name: &str, skip: &[&Url]) -> Vec<Location>
Every cross-file occurrence of name outside skip (the URIs whose
LIVE buffers answer for themselves). A file’s occurrence counts when
its own scope did NOT resolve it (so it reaches across files), or when
the file itself defines the symbol (its local uses ARE the symbol).
Sourcepub fn query(&self, needle: &str, limit: usize) -> Vec<WorkspaceSymbol>
pub fn query(&self, needle: &str, limit: usize) -> Vec<WorkspaceSymbol>
Case-insensitive substring query across the workspace.
Sourcepub fn definition_of(&self, name: &str) -> Option<Location>
pub fn definition_of(&self, name: &str) -> Option<Location>
The definition location for an exact name, for cross-file goto-def. Callable (function) and type-like definitions win over incidental name matches in other kinds.
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.