pub struct HashNodeSmt<D> { /* private fields */ }
Expand description
====================================================================================== A Hash SMT node for the top accumulator that carries just a hash value.
Implementations§
Source§impl<D> HashNodeSmt<D>
impl<D> HashNodeSmt<D>
pub fn new(hash: Vec<u8>) -> HashNodeSmt<D>
Trait Implementations§
Source§impl<D: Clone> Clone for HashNodeSmt<D>
impl<D: Clone> Clone for HashNodeSmt<D>
Source§fn clone(&self) -> HashNodeSmt<D>
fn clone(&self) -> HashNodeSmt<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<D: Debug> Debug for HashNodeSmt<D>
impl<D: Debug> Debug for HashNodeSmt<D>
Source§impl<D: Default> Default for HashNodeSmt<D>
impl<D: Default> Default for HashNodeSmt<D>
Source§fn default() -> HashNodeSmt<D>
fn default() -> HashNodeSmt<D>
Returns the “default value” for a type. Read more
Source§impl<D: Digest> Mergeable for HashNodeSmt<D>
impl<D: Digest> Mergeable for HashNodeSmt<D>
Source§fn merge(lch: &HashNodeSmt<D>, rch: &HashNodeSmt<D>) -> HashNodeSmt<D>
fn merge(lch: &HashNodeSmt<D>, rch: &HashNodeSmt<D>) -> HashNodeSmt<D>
A function to merge two child nodes as the parent node in the SMT.
Source§impl<D: Digest> Paddable for HashNodeSmt<D>
impl<D: Digest> Paddable for HashNodeSmt<D>
Source§impl<D: Clone + Digest> PaddingProvable for HashNodeSmt<D>
impl<D: Clone + Digest> PaddingProvable for HashNodeSmt<D>
Source§type PaddingProof = HashNodeSmt<D>
type PaddingProof = HashNodeSmt<D>
The data type of the proof for a padding node.
Source§fn prove_padding_node(&self, idx: &TreeIndex, secret: &Secret) -> HashNodeSmt<D>
fn prove_padding_node(&self, idx: &TreeIndex, secret: &Secret) -> HashNodeSmt<D>
Generate the proof for padding node at given tree index.
Source§fn verify_padding_node(
node: &<Self as ProofExtractable>::ProofNode,
proof: &Self::PaddingProof,
_idx: &TreeIndex,
) -> bool
fn verify_padding_node( node: &<Self as ProofExtractable>::ProofNode, proof: &Self::PaddingProof, _idx: &TreeIndex, ) -> bool
Verify the proof for a padding node at given tree index with associated node data in the Merkle proof. Read more
Source§impl<D> PartialEq for HashNodeSmt<D>
impl<D> PartialEq for HashNodeSmt<D>
Source§impl<D: Clone> ProofExtractable for HashNodeSmt<D>
impl<D: Clone> ProofExtractable for HashNodeSmt<D>
Source§type ProofNode = HashNodeSmt<D>
type ProofNode = HashNodeSmt<D>
The type of a node with necessary information in Merkle proofs.
Source§fn get_proof_node(&self) -> Self::ProofNode
fn get_proof_node(&self) -> Self::ProofNode
Extracting a proof node from a tree node.
Source§impl<D: Digest> Rand for HashNodeSmt<D>
impl<D: Digest> Rand for HashNodeSmt<D>
Source§impl<D: Digest> Serializable for HashNodeSmt<D>
impl<D: Digest> Serializable for HashNodeSmt<D>
Source§fn deserialize_as_a_unit(
bytes: &[u8],
begin: &mut usize,
) -> Result<Self, DecodingError>
fn deserialize_as_a_unit( bytes: &[u8], begin: &mut usize, ) -> Result<Self, DecodingError>
Decode some of the input bytes starting from the
begin
position as a Self
object,
possibly with some bytes at the end left. Read moreSource§fn deserialize(bytes: &[u8]) -> Result<Self, DecodingError>where
Self: Sized,
fn deserialize(bytes: &[u8]) -> Result<Self, DecodingError>where
Self: Sized,
Decode the input bytes as a
Self
object, using up all bytes. Read moreSource§impl<D: TypeName> TypeName for HashNodeSmt<D>
impl<D: TypeName> TypeName for HashNodeSmt<D>
impl<D> Eq for HashNodeSmt<D>
Auto Trait Implementations§
impl<D> Freeze for HashNodeSmt<D>
impl<D> RefUnwindSafe for HashNodeSmt<D>where
D: RefUnwindSafe,
impl<D> Send for HashNodeSmt<D>where
D: Send,
impl<D> Sync for HashNodeSmt<D>where
D: Sync,
impl<D> Unpin for HashNodeSmt<D>where
D: Unpin,
impl<D> UnwindSafe for HashNodeSmt<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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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