Skip to main content

Module node

Module node 

Source
Expand description

MantarayNode, Fork, and the trie operations (add_fork, find, find_closest, remove_fork). The marshal / unmarshal pair lives in crate::manifest::wire.

Structs§

Fork
One edge of the trie. prefix is the path bytes that select this child; node is the child node.
MantarayNode
One node of the Mantaray trie. Field names mirror bee-js / bee-go.

Constants§

MAX_PREFIX_LENGTH
Per-fork prefix length cap. Longer paths are split into chained nodes with prefixes ≤ MAX_PREFIX_LENGTH each.
NULL_ADDRESS
All-zero 32-byte target address — the canonical “no target” value.
PATH_SEPARATOR
Path separator byte.
TYPE_EDGE
Type bit: this node has child forks.
TYPE_VALUE
Type bit: this node has a non-null target address.
TYPE_WITH_METADATA
Type bit: this fork carries metadata.
TYPE_WITH_PATH_SEPARATOR
Type bit: this node’s path contains a non-leading /.

Functions§

is_null_address
True iff b is empty or all zeros (the canonical null target).