pub struct CallGraphStore { /* private fields */ }Implementations§
Source§impl CallGraphStore
impl CallGraphStore
pub fn open_if_enabled( options: CallGraphStoreOptions, callgraph_dir: PathBuf, project_root: PathBuf, ) -> Result<Option<Self>>
pub fn open(callgraph_dir: PathBuf, project_root: PathBuf) -> Result<Self>
pub fn open_readonly( callgraph_dir: PathBuf, project_root: PathBuf, ) -> Result<Option<Self>>
pub fn cold_build_with_lease( callgraph_dir: PathBuf, project_root: PathBuf, files: &[PathBuf], ) -> Result<(Self, ColdBuildStats)>
pub fn ensure_built_with_lease( callgraph_dir: PathBuf, project_root: PathBuf, files: &[PathBuf], ) -> Result<(Self, Option<ColdBuildStats>)>
pub fn needs_cold_build( callgraph_dir: &Path, project_root: &Path, ) -> Result<bool>
pub fn project_root(&self) -> &Path
pub fn project_key(&self) -> &str
pub fn sqlite_path(&self) -> &Path
Sourcepub fn is_current(&self) -> bool
pub fn is_current(&self) -> bool
True if this store still reflects the currently-published generation. Cheap (one small pointer-file read). When false, another process (or a local cold rebuild) has published a newer generation and the holder should drop this store and reopen via the pointer to converge. A missing pointer keeps the current store (legacy DB still valid, or transient).
pub fn cold_build(&self, files: &[PathBuf]) -> Result<ColdBuildStats>
pub fn refresh_files( &self, changed_files: &[PathBuf], ) -> Result<IncrementalStats>
pub fn refresh_corpus( &self, current_files: &[PathBuf], ) -> Result<ColdBuildStats>
pub fn mark_files_stale(&self, files: &[PathBuf]) -> Result<Vec<String>>
pub fn stale_files(&self) -> Result<Vec<String>>
pub fn backend_status_for_file(&self, file: &Path) -> Result<Option<String>>
pub fn edge_snapshot(&self) -> Result<BTreeSet<StoredEdge>>
pub fn indexed_file_count(&self) -> Result<usize>
pub fn node_for(&self, file_rel: &Path, symbol: &str) -> Result<StoreNode>
Sourcepub fn nodes_for(&self, file_rel: &Path, symbol: &str) -> Result<Vec<StoreNode>>
pub fn nodes_for(&self, file_rel: &Path, symbol: &str) -> Result<Vec<StoreNode>>
Return all positional nodes matching a legacy symbol query in a file.
Consumers that need legacy compatibility can collapse these by
StoreNode::symbol before deciding whether a query is ambiguous.
Sourcepub fn nodes_matching(&self, symbol: &str) -> Result<Vec<StoreNode>>
pub fn nodes_matching(&self, symbol: &str) -> Result<Vec<StoreNode>>
Return all positional nodes matching a symbol query anywhere in the store.
Sourcepub fn direct_callers_of(
&self,
file_rel: &Path,
symbol: &str,
) -> Result<Vec<StoreCallSite>>
pub fn direct_callers_of( &self, file_rel: &Path, symbol: &str, ) -> Result<Vec<StoreCallSite>>
Return direct callers for an already-resolved (file, scoped_symbol) tuple.
pub fn callers_of( &self, file_rel: &Path, symbol: &str, depth: usize, ) -> Result<StoreCallersResult>
pub fn impact_of( &self, file_rel: &Path, symbol: &str, depth: usize, ) -> Result<StoreImpactResult>
pub fn outgoing_calls_of(&self, node: &StoreNode) -> Result<Vec<StoreCallSite>>
pub fn unresolved_calls_of( &self, node: &StoreNode, ) -> Result<Vec<StoreUnresolvedCall>>
pub fn call_tree( &self, file_rel: &Path, symbol: &str, max_depth: usize, ) -> Result<CallTreeNode>
pub fn trace_to( &self, file_rel: &Path, symbol: &str, max_depth: usize, ) -> Result<TraceToResult>
pub fn trace_to_symbol_candidates( &self, to_symbol: &str, ) -> Result<Vec<TraceToSymbolCandidate>>
pub fn trace_to_symbol( &self, file_rel: &Path, symbol: &str, to_symbol: &str, to_file: Option<&Path>, max_depth: usize, ) -> Result<TraceToSymbolResult>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CallGraphStore
impl RefUnwindSafe for CallGraphStore
impl Send for CallGraphStore
impl Sync for CallGraphStore
impl Unpin for CallGraphStore
impl UnsafeUnpin for CallGraphStore
impl UnwindSafe for CallGraphStore
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more