pub enum Value<L: TrieLayout> {
Inline(Bytes),
Node(TrieHash<L>),
NewNode(Option<TrieHash<L>>, Bytes),
}
Expand description
Value representation for Node.
Variants§
Inline(Bytes)
Value bytes inlined in a trie node.
Node(TrieHash<L>)
Hash of the value.
NewNode(Option<TrieHash<L>>, Bytes)
Hash of value bytes if calculated and value bytes. The hash may be undefined until it node is added to the db.
Trait Implementations§
source§impl<L: TrieLayout> Debug for Value<L>
impl<L: TrieLayout> Debug for Value<L>
source§impl<L: TrieLayout> From<&ValueOwned<<<L as TrieLayout>::Hash as Hasher>::Out>> for Value<L>
impl<L: TrieLayout> From<&ValueOwned<<<L as TrieLayout>::Hash as Hasher>::Out>> for Value<L>
source§fn from(val: &ValueOwned<TrieHash<L>>) -> Self
fn from(val: &ValueOwned<TrieHash<L>>) -> Self
Converts to this type from the input type.
source§impl<'a, L: TrieLayout> From<Value<'a>> for Value<L>
impl<'a, L: TrieLayout> From<Value<'a>> for Value<L>
source§fn from(v: EncodedValue<'a>) -> Self
fn from(v: EncodedValue<'a>) -> Self
Converts to this type from the input type.
source§impl<L: TrieLayout> PartialEq for Value<L>
impl<L: TrieLayout> PartialEq for Value<L>
impl<L: Eq + TrieLayout> Eq for Value<L>
Auto Trait Implementations§
impl<L> Freeze for Value<L>
impl<L> RefUnwindSafe for Value<L>
impl<L> Send for Value<L>
impl<L> Sync for Value<L>
impl<L> Unpin for Value<L>
impl<L> UnwindSafe for Value<L>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more