Enum ethcore_util::trie::node::Node [] [src]

pub enum Node<'a> {
    Empty,
    Leaf(NibbleSlice<'a>, &'a [u8]),
    Extension(NibbleSlice<'a>, &'a [u8]),
    Branch([&'a [u8]; 16]Option<&'a [u8]>),
}

Type of node in the trie and essential information thereof.

Variants

Null trie node; could be an empty root or an empty branch entry.

Leaf node; has key slice and value. Value may not be empty.

Extension node; has key slice and node data. Data may not be null.

Branch node; has array of 16 child nodes (each possibly null) and an optional immediate node data.

Methods

impl<'a> Node<'a>
[src]

Decode the node_rlp and return the Node.

Encode the node into RLP.

Will always return the direct node RLP even if it's 32 or more bytes. To get the RLP which would be valid for using in another node, use encoded_and_added().

Trait Implementations

impl<'a> Eq for Node<'a>
[src]

impl<'a> PartialEq for Node<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Debug for Node<'a>
[src]

Formats the value using the given formatter.

impl<'a> Clone for Node<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more