Struct akd::proof_structs::LayerProof
source · pub struct LayerProof<H: Hasher> {
pub label: NodeLabel,
pub siblings: [Node<H>; 1],
pub direction: Direction,
}
Expand description
Proof value at a single layer of the tree
Note that this is really a helper struct to
hold the sibling path for a Merkle tree proof.
When sending a sibling path, you need to know
which direction to hash a node (left or right)
since in a compressed tree, the label alone is not
enough to derive the path.
Thus, we include the direction at which to place the
ancestor of the node for which a proof is being generated.
The parent is the parent of the level in the tree at which you are.
See documentation for MembershipProof
to see how this is used.
Fields
label: NodeLabel
The parent’s label
siblings: [Node<H>; 1]
Siblings of the parent
direction: Direction
The direction
Trait Implementations
sourceimpl<H: Hasher> Clone for LayerProof<H>
impl<H: Hasher> Clone for LayerProof<H>
sourceimpl<H: Debug + Hasher> Debug for LayerProof<H>
impl<H: Debug + Hasher> Debug for LayerProof<H>
sourceimpl<H: PartialEq + Hasher> PartialEq<LayerProof<H>> for LayerProof<H>
impl<H: PartialEq + Hasher> PartialEq<LayerProof<H>> for LayerProof<H>
sourcefn eq(&self, other: &LayerProof<H>) -> bool
fn eq(&self, other: &LayerProof<H>) -> bool
impl<H: Eq + Hasher> Eq for LayerProof<H>
impl<H: Hasher> StructuralEq for LayerProof<H>
impl<H: Hasher> StructuralPartialEq for LayerProof<H>
Auto Trait Implementations
impl<H> RefUnwindSafe for LayerProof<H>where
<H as Hasher>::Digest: RefUnwindSafe,
impl<H> Send for LayerProof<H>
impl<H> Sync for LayerProof<H>
impl<H> Unpin for LayerProof<H>where
<H as Hasher>::Digest: Unpin,
impl<H> UnwindSafe for LayerProof<H>where
<H as Hasher>::Digest: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.