pub struct BinaryMerkleTreeProver<D, H, C> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<T, D, H, C> MerkleTreeProver<T> for BinaryMerkleTreeProver<D, H, C>where
D: PackedField,
T: Sync,
H: Hasher<T, Digest = D> + Send,
C: PseudoCompressionFunction<D, 2> + Sync,
impl<T, D, H, C> MerkleTreeProver<T> for BinaryMerkleTreeProver<D, H, C>where
D: PackedField,
T: Sync,
H: Hasher<T, Digest = D> + Send,
C: PseudoCompressionFunction<D, 2> + Sync,
type Scheme = BinaryMerkleTreeScheme<D, H, C>
source§type Committed = BinaryMerkleTree<D>
type Committed = BinaryMerkleTree<D>
Data generated during commitment required to generate opening proofs.
source§fn commit(
&self,
data: &[T],
batch_size: usize,
) -> Result<(Commitment<D>, Self::Committed), Error>
fn commit( &self, data: &[T], batch_size: usize, ) -> Result<(Commitment<D>, Self::Committed), Error>
Commit a vector of values.
source§fn layer<'a>(
&self,
committed: &'a Self::Committed,
depth: usize,
) -> Result<&'a [D], Error>
fn layer<'a>( &self, committed: &'a Self::Committed, depth: usize, ) -> Result<&'a [D], Error>
Returns the internal digest layer at the given depth.
source§fn prove_opening(
&self,
committed: &Self::Committed,
layer_depth: usize,
index: usize,
) -> Result<Vec<D>, Error>
fn prove_opening( &self, committed: &Self::Committed, layer_depth: usize, index: usize, ) -> Result<Vec<D>, Error>
Generate an opening proof for an entry in a committed vector at the given index. Read more
source§fn commit_iterated<ParIter>(
&self,
iterated_chunks: ParIter,
log_len: usize,
) -> Result<(Commitment<<Self::Scheme as MerkleTreeScheme<T>>::Digest>, Self::Committed), Error>where
ParIter: IndexedParallelIterator<Item: IntoIterator<Item = T>>,
fn commit_iterated<ParIter>(
&self,
iterated_chunks: ParIter,
log_len: usize,
) -> Result<(Commitment<<Self::Scheme as MerkleTreeScheme<T>>::Digest>, Self::Committed), Error>where
ParIter: IndexedParallelIterator<Item: IntoIterator<Item = T>>,
Commit interleaved elements from iterator by val
Auto Trait Implementations§
impl<D, H, C> Freeze for BinaryMerkleTreeProver<D, H, C>where
C: Freeze,
impl<D, H, C> RefUnwindSafe for BinaryMerkleTreeProver<D, H, C>
impl<D, H, C> Send for BinaryMerkleTreeProver<D, H, C>
impl<D, H, C> Sync for BinaryMerkleTreeProver<D, H, C>
impl<D, H, C> Unpin for BinaryMerkleTreeProver<D, H, C>
impl<D, H, C> UnwindSafe for BinaryMerkleTreeProver<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