Skip to main content

WorkspaceIndex

Struct WorkspaceIndex 

Source
pub struct WorkspaceIndex { /* private fields */ }

Implementations§

Source§

impl WorkspaceIndex

Source

pub fn new() -> Self

Source

pub fn scan_folder(&self, root: &Path)

Analyze every LOGOS file under root (bounded). Blocking — run it on a blocking task.

Source

pub fn index_file(&self, path: &Path)

(Re-)analyze one file into the index.

Source

pub fn remove(&self, uri: &Url)

Source

pub fn module_exporting(&self, name: &str) -> Vec<ModuleExport>

Every module that publicly exports name (a function/type/variant).

Source

pub fn imports_of(&self, uri: &Url) -> Vec<String>

The module aliases the file at uri imports.

Source

pub fn imported_symbols(&self, uri: &Url) -> Vec<(String, String)>

The exact symbol labels to complete for this file’s imports, paired with the module they come from. A SELECTIVE Import double from Util. offers only double (or its as alias); a whole-module Import Util. offers every public export of Util — so completion never suggests a name the import didn’t actually bring into scope.

Source

pub fn exports_of(&self, uri: &Url) -> Vec<String>

The public names the module at uri exports (function/type/variant).

Source

pub fn module_names(&self) -> Vec<(String, Url)>

Every indexed module: its import alias and file Url.

Source

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).

Source

pub fn query(&self, needle: &str, limit: usize) -> Vec<WorkspaceSymbol>

Case-insensitive substring query across the workspace.

Source

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

Source§

fn default() -> WorkspaceIndex

Returns the “default value” for a type. Read more
Source§

impl WorkspaceView for WorkspaceIndex

Source§

fn module_exporting(&self, name: &str) -> Vec<ModuleExport>

Every module that publicly exports name (a function/type/variant).
Source§

fn imports_of(&self, uri: &Url) -> Vec<String>

The module aliases the file at uri imports.
Source§

fn module_names(&self) -> Vec<(String, Url)>

Every indexed module: its import alias and file Url.
Source§

fn exports_of(&self, uri: &Url) -> Vec<String>

The public names the module at uri exports. Default empty (fakes that don’t need it are unaffected).
Source§

fn imported_symbols(&self, uri: &Url) -> Vec<(String, String)>

The symbol labels to offer for this file’s imports (label, module alias). Default: whole-module semantics (every export of every imported module) — a fake that only implements imports_of/exports_of keeps its behavior. The real index overrides this to honor selective imports.
Source§

fn is_imported(&self, uri: &Url, name: &str) -> bool

Whether the file at uri imports a module that publicly exports name.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: 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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,