pub struct ProofStore<D> { /* private fields */ }
Expand description
A store derived from a Proof that can be used to generate proofs over any sub-range of the original range.
Implementations§
Source§impl<D: Digest> ProofStore<D>
impl<D: Digest> ProofStore<D>
Sourcepub fn new<I, H, E>(
hasher: &mut H,
proof: &Proof<D>,
elements: &[E],
start_element_pos: u64,
root: &D,
) -> Result<Self, Error>
pub fn new<I, H, E>( hasher: &mut H, proof: &Proof<D>, elements: &[E], start_element_pos: u64, root: &D, ) -> Result<Self, Error>
Create a new ProofStore from a valid Proof over the given range of elements. The resulting store can be used to generate proofs over any sub-range of the original range. Returns an error if the proof is invalid or could not be verified against the given root.
Sourcepub fn new_from_digests(size: u64, digests: Vec<(u64, D)>) -> Self
pub fn new_from_digests(size: u64, digests: Vec<(u64, D)>) -> Self
Create a new ProofStore from the result of calling Proof::verify_range_inclusion_and_extract_digests. The resulting store can be used to generate proofs over any sub-range of the original range.
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for ProofStore<D>
impl<D> RefUnwindSafe for ProofStore<D>where
D: RefUnwindSafe,
impl<D> Send for ProofStore<D>where
D: Send,
impl<D> Sync for ProofStore<D>where
D: Sync,
impl<D> Unpin for ProofStore<D>where
D: Unpin,
impl<D> UnwindSafe for ProofStore<D>where
D: 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