# 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

`Empty`

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

`Leaf(NibbleSlice<'a>, &'a [u8])`

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

`Extension(NibbleSlice<'a>, &'a [u8])`

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

`Branch([&'a [u8]; 16], Option<&'a [u8]>)`

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

## Methods

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

#### `fn decoded(node_rlp: &'a [u8]) -> Self`

Decode the `node_rlp` and return the Node.

#### `fn encoded(&self) -> Bytes`

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]

#### `fn eq(&self, __arg_0: &Node<'a>) -> bool`

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

#### `fn ne(&self, __arg_0: &Node<'a>) -> bool`

This method tests for `!=`.

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

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

Formats the value using the given formatter.

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

#### `fn clone(&self) -> Node<'a>`

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0

Performs copy-assignment from `source`. Read more

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)