[−][src]Enum casperlabs_engine_storage::trie::Trie
Represents a Merkle Trie
Variants
Fields of Node
pointer_block: Box<PointerBlock>
Methods
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: &[(usize, 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<K: Eq, V: Eq> Eq for Trie<K, V>
[src]
impl<K: FromBytes, V: FromBytes> FromBytes for Trie<K, V>
[src]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>
[src]
fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>
[src]
impl<K: PartialEq, V: PartialEq> PartialEq<Trie<K, V>> for Trie<K, V>
[src]
impl<K, V> Store<Blake2bHash, Trie<K, V>> for InMemoryTrieStore
[src]
type Error = Error
type Handle = Option<String>
fn handle(&self) -> Self::Handle
[src]
fn get<T>(&self, txn: &T, key: &K) -> Result<Option<V>, Self::Error> where
T: Readable<Handle = Self::Handle>,
K: ToBytes,
V: FromBytes,
Self::Error: From<T::Error>,
[src]
T: Readable<Handle = Self::Handle>,
K: ToBytes,
V: FromBytes,
Self::Error: From<T::Error>,
fn put<T>(&self, txn: &mut T, key: &K, value: &V) -> Result<(), Self::Error> where
T: Writable<Handle = Self::Handle>,
K: ToBytes,
V: ToBytes,
Self::Error: From<T::Error>,
[src]
T: Writable<Handle = Self::Handle>,
K: ToBytes,
V: ToBytes,
Self::Error: From<T::Error>,
impl<K, V> Store<Blake2bHash, Trie<K, V>> for LmdbTrieStore
[src]
type Error = Error
type Handle = Database
fn handle(&self) -> Self::Handle
[src]
fn get<T>(&self, txn: &T, key: &K) -> Result<Option<V>, Self::Error> where
T: Readable<Handle = Self::Handle>,
K: ToBytes,
V: FromBytes,
Self::Error: From<T::Error>,
[src]
T: Readable<Handle = Self::Handle>,
K: ToBytes,
V: FromBytes,
Self::Error: From<T::Error>,
fn put<T>(&self, txn: &mut T, key: &K, value: &V) -> Result<(), Self::Error> where
T: Writable<Handle = Self::Handle>,
K: ToBytes,
V: ToBytes,
Self::Error: From<T::Error>,
[src]
T: Writable<Handle = Self::Handle>,
K: ToBytes,
V: ToBytes,
Self::Error: From<T::Error>,
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]
K: ToBytes,
V: ToBytes,
Auto Trait Implementations
impl<K, V> RefUnwindSafe for Trie<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Trie<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for Trie<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for Trie<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for Trie<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,