pub struct Verifier<'a, H: CHasher> { /* private fields */ }Expand description
A Hasher implementation to use when verifying proofs over GraftedStorage.
Implementations§
Trait Implementations§
Source§impl<H: CHasher> Hasher<<H as Hasher>::Digest> for Verifier<'_, H>
impl<H: CHasher> Hasher<<H as Hasher>::Digest> for Verifier<'_, H>
type Inner = H
Source§fn leaf_digest(&mut self, pos: Position, element: &[u8]) -> H::Digest
fn leaf_digest(&mut self, pos: Position, element: &[u8]) -> H::Digest
Computes the digest for a leaf given its position and the element it represents.
Source§fn fork(&self) -> impl HasherTrait<H::Digest>
fn fork(&self) -> impl HasherTrait<H::Digest>
Fork the hasher to provide equivalent functionality in another thread. This is different
than Clone::clone because the forked hasher need not be a deep copy, and may share non-mutable
state with the hasher from which it was forked.
Source§fn node_digest(
&mut self,
pos: Position,
left_digest: &H::Digest,
right_digest: &H::Digest,
) -> H::Digest
fn node_digest( &mut self, pos: Position, left_digest: &H::Digest, right_digest: &H::Digest, ) -> H::Digest
Computes the digest for a node given its position and the digests of its children.
Auto Trait Implementations§
impl<'a, H> Freeze for Verifier<'a, H>where
H: Freeze,
impl<'a, H> RefUnwindSafe for Verifier<'a, H>where
H: RefUnwindSafe,
impl<'a, H> Send for Verifier<'a, H>
impl<'a, H> Sync for Verifier<'a, H>
impl<'a, H> Unpin for Verifier<'a, H>where
H: Unpin,
impl<'a, H> UnwindSafe for Verifier<'a, 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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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