pub struct MerkleTreeTrace {
pub boundaries: MerkleBoundaries,
pub nodes: Vec<MerklePathEvent>,
pub root: HashSet<MerkleRootEvent>,
}
Expand description
Struct representing the trace of the merkle tree inclusion proof statement.
Fields§
§boundaries: MerkleBoundaries
§nodes: Vec<MerklePathEvent>
§root: HashSet<MerkleRootEvent>
Implementations§
Source§impl MerkleTreeTrace
impl MerkleTreeTrace
Sourcepub fn generate(roots: Vec<[u8; 32]>, paths: &[MerklePath]) -> Self
pub fn generate(roots: Vec<[u8; 32]>, paths: &[MerklePath]) -> Self
Method to generate the trace given the witness values. The function assumes that the root_id is the index of the root in the roots vector and that the paths and leaves are passed in with their assigned root_id.
pub fn validate(&self)
Auto Trait Implementations§
impl Freeze for MerkleTreeTrace
impl RefUnwindSafe for MerkleTreeTrace
impl Send for MerkleTreeTrace
impl Sync for MerkleTreeTrace
impl Unpin for MerkleTreeTrace
impl UnwindSafe for MerkleTreeTrace
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