pub struct XrefGraph { /* private fields */ }Expand description
In-memory cross-project symbol reference graph.
Edges can be added incrementally; stale edges are marked and pruned when a
project is re-indexed via rebuild_project_xrefs.
Implementations§
Source§impl XrefGraph
impl XrefGraph
Sourcepub fn mark_stale(&mut self, project: &str)
pub fn mark_stale(&mut self, project: &str)
Mark all edges whose source_project or target_project matches
project as stale.
Sourcepub fn prune_stale(&mut self)
pub fn prune_stale(&mut self)
Remove all edges that have been marked stale.
Sourcepub fn xref_query(
&self,
symbol: &str,
direction: XrefDirection,
) -> Vec<&XrefEdge>
pub fn xref_query( &self, symbol: &str, direction: XrefDirection, ) -> Vec<&XrefEdge>
Query cross-project references for a symbol.
Only non-stale edges are returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XrefGraph
impl RefUnwindSafe for XrefGraph
impl Send for XrefGraph
impl Sync for XrefGraph
impl Unpin for XrefGraph
impl UnsafeUnpin for XrefGraph
impl UnwindSafe for XrefGraph
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