pub fn peel_until<G>(
graph: &G,
node: NodeId,
target_type: NodeConstraint,
) -> Result<Option<NodeId>>where
G: SwhLabeledForwardGraph + SwhGraphWithProperties,
<G as SwhGraphWithProperties>::LabelNames: LabelNames,
<G as SwhGraphWithProperties>::Maps: Maps,Expand description
Recursively peel a node until a node with a type matching the specified constraint is reached.
This is analogous to libgit2’s
git_object_peel.
See peel_once for peeling rules.
See peel to peel to any type that is different from node’s
(analogous to GIT_OBJECT_ANY)
Returns Ok(Some(node_id)) on success, where node_id is the peel result, Ok(None) if no
suitable successor exists (e.g., a root revision with no directory successor).