Enum sp_trie::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 for MerkleValue<H>where
H: Clone,
impl<H> Clone for MerkleValue<H>where
H: Clone,
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 for MerkleValue<H>where
H: Debug,
impl<H> Debug for MerkleValue<H>where
H: Debug,
source§impl<H> PartialEq for MerkleValue<H>where
H: PartialEq,
impl<H> PartialEq for MerkleValue<H>where
H: PartialEq,
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 for MerkleValue<H>where
H: Eq,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.