pub struct ForwardStitcher<'d, 'a> { /* private fields */ }Expand description
Extends walks from the references of one file, phase by phase, with the stored partial paths.
Implementations§
Source§impl<'d, 'a> ForwardStitcher<'d, 'a>
impl<'d, 'a> ForwardStitcher<'d, 'a>
Sourcepub fn from_references(
database: &'d PartialPathDatabase<'a>,
file: &'a str,
references: impl IntoIterator<Item = NodeId>,
max_work: usize,
) -> Self
pub fn from_references( database: &'d PartialPathDatabase<'a>, file: &'a str, references: impl IntoIterator<Item = NodeId>, max_work: usize, ) -> Self
A stitcher whose walks start at those references of file that are references, and
that tries at most max_work stored paths from each of them.
Sourcepub fn process_next_phase(&mut self) -> Vec<StitchedPath<'a>>
pub fn process_next_phase(&mut self) -> Vec<StitchedPath<'a>>
Extends every pending walk by one stored path, and returns the walks that now reach a
definition with no symbol left to find. A walk that reaches an import also goes on to
what the import names. A walk that needs symbols on the stack before the reference is
dropped, since a reference starts from an empty stack: at a root, no stored path that needs
symbols below the reference is tried. A reference that runs out of work with stored paths
left to try stops there and is reported by Self::exhausted.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether no walk is left to extend.