unsafe fn remove_child_from_inner_node_and_compress<const PREFIX_LEN: usize, N: InnerNode<PREFIX_LEN>, A: Allocator>(
inner_node_ptr: NodePtr<PREFIX_LEN, N>,
key_fragment: u8,
alloc: &A,
) -> Option<OpaqueNodePtr<N::Key, N::Value, PREFIX_LEN>>
Expand description
Remove a child node from the given inner node, return the child node pointer if it was compressed.
The inner node will be compressed if there was only a single child remaining after the delete. Compressing the node involves prepending the inner node key prefix and child key byte to the child’s key prefix.
§Safety
inner_node_ptr
must be a unique pointer to the node and must not have any other mutable references.- There must not be any mutable references to the children of the given inner node either.
alloc
must be the same allocator that was used to allocate the nodes of the trie.