Skip to main content

walk_node

Function walk_node 

Source
fn walk_node(
    segments: &mut Segments,
    directories: &HashMap<B3Digest, Directory>,
    node: &Node,
    nar_node: Node<'_, Vec<u8>>,
)
Expand description

Used during construction. Recursively walks the node and its children, and pushes new segments.

The function is infallible, as:

  • we only write to buffers
  • all castore PathComponent and SymlinkTarget can be expressed in NAR
  • the passed directory closure is complete