Enum casper_execution_engine::storage::trie::Trie[][src]

pub enum Trie<K, V> {
    Leaf {
        key: K,
        value: V,
    },
    Node {
        pointer_block: Box<PointerBlock>,
    },
    Extension {
        affix: Bytes,
        pointer: Pointer,
    },
}

Represents a Merkle Trie

Variants

Leaf

Fields of Leaf

key: Kvalue: V
Node

Fields of Node

pointer_block: Box<PointerBlock>
Extension

Fields of Extension

affix: Bytespointer: Pointer

Implementations

impl<K, V> Trie<K, V>[src]

pub fn leaf(key: K, value: V) -> Self[src]

Constructs a Trie::Leaf from a given key and value.

pub fn node(indexed_pointers: &[(u8, Pointer)]) -> Self[src]

Constructs a Trie::Node from a given slice of indexed pointers.

pub fn extension(affix: Vec<u8>, pointer: Pointer) -> Self[src]

Constructs a Trie::Extension from a given affix and pointer.

pub fn key(&self) -> Option<&K>[src]

Trait Implementations

impl<K: Clone, V: Clone> Clone for Trie<K, V>[src]

impl<K: Debug, V: Debug> Debug for Trie<K, V>[src]

impl<'de, K, V> Deserialize<'de> for Trie<K, V> where
    K: Deserialize<'de>,
    V: Deserialize<'de>, 
[src]

impl<K, V> Display for Trie<K, V> where
    K: Debug,
    V: Debug
[src]

impl<K: Eq, V: Eq> Eq for Trie<K, V>[src]

impl<K: FromBytes, V: FromBytes> FromBytes for Trie<K, V>[src]

impl<K: PartialEq, V: PartialEq> PartialEq<Trie<K, V>> for Trie<K, V>[src]

impl<K, V> Serialize for Trie<K, V> where
    K: Serialize,
    V: Serialize
[src]

impl<K, V> Store<Blake2bHash, Trie<K, V>> for InMemoryTrieStore[src]

type Error = Error

type Handle = Option<String>

impl<K, V> Store<Blake2bHash, Trie<K, V>> for LmdbTrieStore[src]

type Error = Error

type Handle = Database

impl<K, V> StructuralEq for Trie<K, V>[src]

impl<K, V> StructuralPartialEq for Trie<K, V>[src]

impl<K, V> ToBytes for Trie<K, V> where
    K: ToBytes,
    V: ToBytes
[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for Trie<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for Trie<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for Trie<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for Trie<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for Trie<K, V> where
    K: UnwindSafe,
    V: UnwindSafe

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> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> FmtForward for T

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

impl<T> Instrument for T[src]

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,