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>
impl<H: Eq> Eq for MerkleValue<H>
impl<H> StructuralPartialEq for MerkleValue<H>
Auto Trait Implementations§
impl<H> Freeze for MerkleValue<H>where
H: Freeze,
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