pub fn next_entry<'a, I, P>(
components: &mut Peekable<I>,
tree: Data<'a>,
) -> ControlFlow<Option<EntryRef<'a>>, ObjectId>Expand description
Advance a path lookup by matching the next path component against tree.
components must yield the remaining path components to resolve, and tree must be the
current object to search in.
The return value indicates how the caller should proceed:
ControlFlow::Continuecontains the object id of the matched entry when there are more components left to resolve. Callers should load that object and pass it back into a subsequent invocation.ControlFlow::Break(Some(entry))contains the matched entry for the final component, and signals that lookup completed successfully.ControlFlow::Break(None)signals that lookup cannot continue and should stop without a match. This happens iftreeis not a tree object, ifcomponentsis already exhausted, or if the next component is not present intree.
Note that this behaviour is tuned to prefer to exhaust the entire chain of components, only the
last component can yield a ControlFlow::Break.