Skip to main content

read_node

Function read_node 

Source
pub fn read_node(
    r: &mut BitReader<'_>,
    key_index_width: u8,
) -> Result<Node, Error>
Expand description

Decode a Node from the bit stream.

key_index_width is the bit width used for key-index fields, derived from the descriptor’s path-decl head. Filled in across phases 7-11.

Top-level entry point. Internally threads a recursion-depth counter that errors out at MAX_DECODE_DEPTH before parsing the next node, so a hostile wire payload nesting recursive tags (Tag::Sh, Tag::AndV, Tag::TapTree, etc.) arbitrarily deep cannot blow the Rust stack.