Skip to main content

walk

Function walk 

Source
pub fn walk<F>(
    root_digest: &str,
    root: &LayerView,
    fetch: F,
) -> Result<Vec<(String, LayerView)>, ComposeError>
where F: FnMut(&str) -> Option<LayerView>,
Expand description

Walk a composition graph breadth-first from a root manifest, refusing cycles and excessive depth. fetch supplies a manifest for a digest, or None if that layer is not installed — a missing layer is the caller’s error to report (with its corrective varve install), not this walker’s to invent.

Returns the visit order, root first, so callers can union tools predictably.