Enum trie_db_fun::MerkleValue
source · pub enum MerkleValue<H> {
Node(Vec<u8>),
Hash(H),
}Expand description
Either the hash or value of a node depending on its size.
If the size of the node value is bigger or equal than MAX_INLINE_VALUE the hash is
returned.
Variants§
Node(Vec<u8>)
The merkle value is the node data itself when the
node data is smaller than MAX_INLINE_VALUE.
Note: The case of inline nodes.
Hash(H)
The merkle value is the hash of the node.
Trait Implementations§
source§impl<H: Clone> Clone for MerkleValue<H>
impl<H: Clone> Clone for MerkleValue<H>
source§fn clone(&self) -> MerkleValue<H>
fn clone(&self) -> MerkleValue<H>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<H: Debug> Debug for MerkleValue<H>
impl<H: Debug> Debug for MerkleValue<H>
source§impl<H: PartialEq> PartialEq for MerkleValue<H>
impl<H: PartialEq> PartialEq for MerkleValue<H>
source§fn eq(&self, other: &MerkleValue<H>) -> bool
fn eq(&self, other: &MerkleValue<H>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<H: Eq> Eq for MerkleValue<H>
impl<H> StructuralPartialEq for MerkleValue<H>
Auto Trait Implementations§
impl<H> RefUnwindSafe for MerkleValue<H>where
H: RefUnwindSafe,
impl<H> Send for MerkleValue<H>where
H: Send,
impl<H> Sync for MerkleValue<H>where
H: Sync,
impl<H> Unpin for MerkleValue<H>where
H: Unpin,
impl<H> UnwindSafe for MerkleValue<H>where
H: UnwindSafe,
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