[][src]Enum multiproof_rs::node::Node

pub enum Node {
    Hash(Vec<u8>),
    Leaf(NibbleKeyVec<u8>),
    Extension(NibbleKeyBox<Node>),
    Branch(Vec<Node>),
    EmptySlot,
}

Variants

Hash(Vec<u8>)
Leaf(NibbleKeyVec<u8>)
Extension(NibbleKeyBox<Node>)
Branch(Vec<Node>)
EmptySlot

Methods

impl Node[src]

pub fn graphviz(&self) -> String[src]

pub fn hash(&self) -> Vec<u8>[src]

pub fn composition(&self) -> Vec<u8>[src]

Trait Implementations

impl Clone for Node[src]

impl Debug for Node[src]

impl Decodable for Node[src]

impl Default for Node[src]

impl Encodable for Node[src]

impl<'_> Index<&'_ NibbleKey> for Node[src]

type Output = Node

The returned type after indexing.

impl NodeType for Node[src]

type Key = NibbleKey

The tree's key type. Must be specified when implementing this trait.

type Value = Vec<u8>

The tree's value type. Must be specified when implementing this trait.

impl PartialEq<Node> for Node[src]

impl StructuralPartialEq for Node[src]

impl Tree<Node> for Node[src]

fn num_children(&self) -> usize[src]

Returns the maximum child count of the tree's root.

Branch nodes will always report 16, as empty slots are counted as children.

fn ith_child(&self, index: usize) -> Option<&Self>[src]

Return the tree root's ith child.

The function will return EmptySlot instead of None if a branch node has no ith child.

Auto Trait Implementations

impl RefUnwindSafe for Node

impl Send for Node

impl Sync for Node

impl Unpin for Node

impl UnwindSafe for Node

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.