Function tvix_castore::nodes::directory::check_insert_node
source · fn check_insert_node(
current_size: u64,
nodes: &mut BTreeMap<PathComponent, Node>,
name: PathComponent,
node: Node,
) -> Result<u64, DirectoryError>
Expand description
Helper function dealing with inserting nodes into the nodes BTreeMap, after ensuring the new size doesn’t overlow and the key doesn’t exist already.
Returns the new total size, or an error.