pub struct PartialPathDatabase<'a> { /* private fields */ }Expand description
The minimal partial paths of each file, kept with the graph they walk.
Implementations§
Source§impl<'a> PartialPathDatabase<'a>
impl<'a> PartialPathDatabase<'a>
Sourcepub fn add_file(
&mut self,
file: &'a str,
graph: &'a StackGraph,
max_work: usize,
)
pub fn add_file( &mut self, file: &'a str, graph: &'a StackGraph, max_work: usize, )
Stores the minimal partial paths of graph as file’s, in place of any it had, trying
at most max_work edges from each endpoint.
Sourcepub fn graph(&self, file: &str) -> Option<&'a StackGraph>
pub fn graph(&self, file: &str) -> Option<&'a StackGraph>
The graph file’s paths walk.
Sourcepub fn path(&self, id: PartialPathId<'_>) -> Option<&PartialPath<'a>>
pub fn path(&self, id: PartialPathId<'_>) -> Option<&PartialPath<'a>>
The path stored under id, an id this database gave.
Sourcepub fn starting_at(
&self,
file: &str,
node: NodeId,
) -> impl Iterator<Item = (PartialPathId<'_>, &PartialPath<'a>)> + '_
pub fn starting_at( &self, file: &str, node: NodeId, ) -> impl Iterator<Item = (PartialPathId<'_>, &PartialPath<'a>)> + '_
The paths of file that start at node.
Sourcepub fn starting_at_root(
&self,
left: &PartialSymbolStack<'a>,
) -> Vec<(PartialPathId<'a>, &PartialPath<'a>)>
pub fn starting_at_root( &self, left: &PartialSymbolStack<'a>, ) -> Vec<(PartialPathId<'a>, &PartialPath<'a>)>
The paths of any file that start at its root and whose needed stack may follow left,
a stack left at a root: one is a prefix of the other, and the longer one is only
reachable through the variable of the shorter.
Trait Implementations§
Source§impl<'a> Clone for PartialPathDatabase<'a>
impl<'a> Clone for PartialPathDatabase<'a>
Source§impl<'a> Debug for PartialPathDatabase<'a>
impl<'a> Debug for PartialPathDatabase<'a>
Auto Trait Implementations§
impl<'a> Forget for PartialPathDatabase<'a>
impl<'a> Freeze for PartialPathDatabase<'a>
impl<'a> RefUnwindSafe for PartialPathDatabase<'a>
impl<'a> Send for PartialPathDatabase<'a>
impl<'a> Sync for PartialPathDatabase<'a>
impl<'a> Unpin for PartialPathDatabase<'a>
impl<'a> UnsafeUnpin for PartialPathDatabase<'a>
impl<'a> UnwindSafe for PartialPathDatabase<'a>
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