Skip to main content

attach

Function attach 

Source
fn attach<'a>(
    node: &mut Node,
    below: &mut Vec<(&'a str, &'a Cid)>,
    layer: usize,
    blocks: &mut BTreeMap<Cid, Vec<u8>>,
    nodes: &mut BTreeMap<Cid, Node>,
)
Expand description

Builds the pending run of lower keys and hangs it off the node.

It goes on the last entry if there is one and on left if there is not, which is the same statement as “the subtree sits between the entry before it and the entry after it”.