Enum casper_execution_engine::storage::trie::Trie [−][src]
Represents a Merkle Trie
Variants
Fields of Node
pointer_block: Box<PointerBlock>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]
K: Deserialize<'de>,
V: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl<K, V> Display for Trie<K, V> where
K: Debug,
V: Debug, [src]
K: Debug,
V: Debug,
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]
pub fn from_vec(
bytes: Vec<u8, Global>
) -> Result<(Self, Vec<u8, Global>), Error>[src]
bytes: Vec<u8, Global>
) -> Result<(Self, Vec<u8, Global>), Error>
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]
K: Serialize,
V: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
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, [src]
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Trie<K, V> where
K: Send,
V: Send, [src]
K: Send,
V: Send,
impl<K, V> Sync for Trie<K, V> where
K: Sync,
V: Sync, [src]
K: Sync,
V: Sync,
impl<K, V> Unpin for Trie<K, V> where
K: Unpin,
V: Unpin, [src]
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for Trie<K, V> where
K: UnwindSafe,
V: UnwindSafe, [src]
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,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone, [src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[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.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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.
pub 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.
pub 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>,