pub struct MerkleCap<F, Digest> { /* private fields */ }Expand description
The Merkle cap of height h of a Merkle tree is the h-th layer (from the root) of the tree.
It can be used in place of the root to verify Merkle paths, which are h elements shorter.
A cap of height 0 contains a single element (the root), while a cap of height h contains
2^h elements. The Digest type is the full digest (e.g. [W; DIGEST_ELEMS]).
Implementations§
Source§impl<F, Digest> MerkleCap<F, Digest>
impl<F, Digest> MerkleCap<F, Digest>
Trait Implementations§
Source§impl<'de, F, Digest> Deserialize<'de> for MerkleCap<F, Digest>where
Digest: Deserialize<'de>,
impl<'de, F, Digest> Deserialize<'de> for MerkleCap<F, Digest>where
Digest: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F, Digest> IntoIterator for MerkleCap<F, Digest>
impl<F, Digest> IntoIterator for MerkleCap<F, Digest>
impl<F: Eq, Digest: Eq> Eq for MerkleCap<F, Digest>
impl<F, Digest> StructuralPartialEq for MerkleCap<F, Digest>
Auto Trait Implementations§
impl<F, Digest> Freeze for MerkleCap<F, Digest>
impl<F, Digest> RefUnwindSafe for MerkleCap<F, Digest>where
F: RefUnwindSafe,
Digest: RefUnwindSafe,
impl<F, Digest> Send for MerkleCap<F, Digest>
impl<F, Digest> Sync for MerkleCap<F, Digest>
impl<F, Digest> Unpin for MerkleCap<F, Digest>
impl<F, Digest> UnsafeUnpin for MerkleCap<F, Digest>
impl<F, Digest> UnwindSafe for MerkleCap<F, Digest>where
F: UnwindSafe,
Digest: 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§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 more