pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
pub fn open(db_path: &Path, root: &Path) -> Result<Store>
Sourcepub fn hash_of(source: &str) -> String
pub fn hash_of(source: &str) -> String
Stable content hash for freshness comparison. Uses DefaultHasher — deterministic within a build, sufficient for this use.
Sourcepub fn is_current(&self, path: &str, source: &str) -> bool
pub fn is_current(&self, path: &str, source: &str) -> bool
Returns true if the stored hash for path matches hash_of(source).
Sourcepub fn index_file(&self, path: &str, source: &str, mtime: i64) -> Result<()>
pub fn index_file(&self, path: &str, source: &str, mtime: i64) -> Result<()>
Transactionally re-index a file: delete prior rows, extract+resolve, insert new rows. No-ops for files with unsupported languages (upserts only the file row with lang=‘’).
Sourcepub fn neighborhood(&self, symbol_name: &str) -> Option<Neighborhood>
pub fn neighborhood(&self, symbol_name: &str) -> Option<Neighborhood>
Returns the definition + callers + callees + imports for the first symbol
matching symbol_name.
When the same name is defined in more than one place this collapses to one
arbitrary match; prefer Store::neighborhood_all in that case.
Sourcepub fn neighborhood_all(&self, symbol_name: &str) -> Vec<Neighborhood>
pub fn neighborhood_all(&self, symbol_name: &str) -> Vec<Neighborhood>
Returns one Neighborhood per definition site matching symbol_name,
ordered by file then start line (deterministic). Empty when the name is
not indexed. This is the multi-result form that avoids the single-winner
collapse of Store::neighborhood.
Sourcepub fn symbol_names(&self) -> Vec<String>
pub fn symbol_names(&self) -> Vec<String>
Returns the names of every symbol currently in the index.
Sourcepub fn resolve_in_file(&self, file: &str, name: &str) -> Option<SymbolRef>
pub fn resolve_in_file(&self, file: &str, name: &str) -> Option<SymbolRef>
Returns the first symbol named name in file.
Sourcepub fn stats(&self) -> (usize, usize, usize)
pub fn stats(&self) -> (usize, usize, usize)
Returns (files, symbols, edges) counts for rinne graph stats.
Sourcepub fn symbols_in(&self, path: &str) -> Vec<Symbol>
pub fn symbols_in(&self, path: &str) -> Vec<Symbol>
Returns all symbols defined in a given file.