pub struct InMemoryGraphStore { /* private fields */ }Expand description
An in-memory GraphStore, one slice per path.
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryGraphStore
impl Debug for InMemoryGraphStore
Source§impl Default for InMemoryGraphStore
impl Default for InMemoryGraphStore
Source§fn default() -> InMemoryGraphStore
fn default() -> InMemoryGraphStore
Returns the “default value” for a type. Read more
Source§impl GraphStore for InMemoryGraphStore
impl GraphStore for InMemoryGraphStore
Source§fn insert(&mut self, path: &str, graph: CodeGraph)
fn insert(&mut self, path: &str, graph: CodeGraph)
Insert (or replace) the slice assembled at
path. Re-inserting the same
path overwrites — slices are content-addressed and write-if-absent, never
appended, so this cannot duplicate a file’s symbols.Source§fn definitions(&self, name: &str) -> Vec<Located<Symbol>>
fn definitions(&self, name: &str) -> Vec<Located<Symbol>>
Definitions matching
name, each with the path it was found under (there
may be several — names are unresolved).Source§fn references_to(&self, name: &str) -> Vec<Located<Reference>>
fn references_to(&self, name: &str) -> Vec<Located<Reference>>
References whose target name is
name, each with its path.Source§fn callers_of(&self, name: &str) -> Vec<String>
fn callers_of(&self, name: &str) -> Vec<String>
Distinct enclosing-function names that reference
name.Source§fn callees(&self, name: &str) -> Vec<String>
fn callees(&self, name: &str) -> Vec<String>
Distinct names referenced from within
name (the inverse of
callers_of), sorted.Source§fn all_symbols(&self) -> Vec<Located<Symbol>>
fn all_symbols(&self) -> Vec<Located<Symbol>>
Every symbol in the view, each with its path (used for whole-graph
operations like diffing).
Source§fn all_references(&self) -> Vec<Located<Reference>>
fn all_references(&self) -> Vec<Located<Reference>>
Every reference in the view, each with its path.
Source§fn impact(&self, name: &str) -> Vec<String>
fn impact(&self, name: &str) -> Vec<String>
The transitive closure of callers: every symbol that could be affected if
name changes, reached by walking callers_of
breadth-first. Runs server-side (never ships the whole graph); the seed
name is excluded, and cycles terminate via a visited set. Returned
sorted.Source§fn overview(&self, largest: usize) -> ViewOverview
fn overview(&self, largest: usize) -> ViewOverview
The aggregate shape of the whole view: counts, a breakdown by kind and
by language, and the
largest files by symbol count. Read moreSource§fn unreferenced(
&self,
filter: &SymbolFilter,
exclude_tests: bool,
limit: usize,
) -> Page<Located<Symbol>>
fn unreferenced( &self, filter: &SymbolFilter, exclude_tests: bool, limit: usize, ) -> Page<Located<Symbol>>
Symbols with no inbound reference anywhere in the view — dead-code
candidates, in path then line order. Read more
Auto Trait Implementations§
impl Freeze for InMemoryGraphStore
impl RefUnwindSafe for InMemoryGraphStore
impl Send for InMemoryGraphStore
impl Sync for InMemoryGraphStore
impl Unpin for InMemoryGraphStore
impl UnsafeUnpin for InMemoryGraphStore
impl UnwindSafe for InMemoryGraphStore
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