pub struct BinaryMerkleTreeScheme<D, H, C> { /* private fields */ }
Implementations§
source§impl<D, H, C> BinaryMerkleTreeScheme<D, H, C>
impl<D, H, C> BinaryMerkleTreeScheme<D, H, C>
Trait Implementations§
source§impl<T, D, H, C> MerkleTreeScheme<T> for BinaryMerkleTreeScheme<D, H, C>
impl<T, D, H, C> MerkleTreeScheme<T> for BinaryMerkleTreeScheme<D, H, C>
source§fn optimal_verify_layer(&self, n_queries: usize, tree_depth: usize) -> usize
fn optimal_verify_layer(&self, n_queries: usize, tree_depth: usize) -> usize
This layer allows minimizing the proof size.
type Digest = D
type Proof = Vec<D>
source§fn proof_size(
&self,
len: usize,
n_queries: usize,
layer_depth: usize,
) -> Result<usize, Error>
fn proof_size( &self, len: usize, n_queries: usize, layer_depth: usize, ) -> Result<usize, Error>
Returns the total byte-size of a proof for multiple opening queries. Read more
source§fn verify_vector(
&self,
root: &Self::Digest,
data: &[T],
batch_size: usize,
) -> Result<(), Error>
fn verify_vector( &self, root: &Self::Digest, data: &[T], batch_size: usize, ) -> Result<(), Error>
Verify the opening of the full vector.
Auto Trait Implementations§
impl<D, H, C> Freeze for BinaryMerkleTreeScheme<D, H, C>where
C: Freeze,
impl<D, H, C> RefUnwindSafe for BinaryMerkleTreeScheme<D, H, C>
impl<D, H, C> Send for BinaryMerkleTreeScheme<D, H, C>
impl<D, H, C> Sync for BinaryMerkleTreeScheme<D, H, C>
impl<D, H, C> Unpin for BinaryMerkleTreeScheme<D, H, C>
impl<D, H, C> UnwindSafe for BinaryMerkleTreeScheme<D, H, C>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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