Skip to main content

DefaultNode

Type Alias DefaultNode 

Source
pub type DefaultNode<T> = Node<T, DefaultStorage>;
Expand description

Type alias for Node with DefaultStorage. Provided to improve inference by concretizing the storage type.

Aliased Type§

pub struct DefaultNode<T> {
    pub prefixes: Array256<Vec<T>>,
    pub children: Array256<Vec<Child<Box<Node<T>>, T>>>,
}

Fields§

§prefixes: Array256<Vec<T>>

The prefixes this node covers directly, indexed by BaseIndex.

If this node is at trie depth 3 via octet path [192, 168] for instance, the prefix entry 12/5 => 34 would represent the overall trie route mapping 192.168.12.0/21 => 34.

§children: Array256<Vec<Child<Box<Node<T>>, T>>>

The children contained in this node, indexed by complete prefix octet.