Skip to main content

CodeGraph

Trait CodeGraph 

Source
pub trait CodeGraph: Send + Sync {
    // Required methods
    fn neighborhood(&self, symbol: &str) -> Option<Neighborhood>;
    fn resolve_in_file(&self, file: &str, name: &str) -> Option<SymbolRef>;
    fn symbol_names(&self) -> Vec<String>;
}
Expand description

Read-only view over the code graph. Implementations must be Send + Sync so they can be shared across async task boundaries.

Required Methods§

Source

fn neighborhood(&self, symbol: &str) -> Option<Neighborhood>

Returns the neighborhood of the first symbol matching symbol, or None if the symbol is not in the index.

Source

fn resolve_in_file(&self, file: &str, name: &str) -> Option<SymbolRef>

Returns the first symbol named name defined in file, or None.

Source

fn symbol_names(&self) -> Vec<String>

Returns the names of every symbol currently in the index.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§