Struct diem_sdk::types::proof::SparseMerkleRangeProof
pub struct SparseMerkleRangeProof { /* private fields */ }
Expand description
A proof that can be used authenticate a range of consecutive leaves, from the leftmost leaf to a certain one, in a sparse Merkle tree. For example, given the following sparse Merkle tree:
root
/ \
/ \
/ \
o o
/ \ / \
a o o h
/ \ / \
o d e X
/ \ / \
b c f g
if the proof wants show that [a, b, c, d, e]
exists in the tree, it would need the siblings
X
and h
on the right.
Implementations§
§impl SparseMerkleRangeProof
impl SparseMerkleRangeProof
pub fn new(right_siblings: Vec<HashValue, Global>) -> SparseMerkleRangeProof
pub fn new(right_siblings: Vec<HashValue, Global>) -> SparseMerkleRangeProof
Constructs a new SparseMerkleRangeProof
.
pub fn right_siblings(&self) -> &[HashValue]
pub fn right_siblings(&self) -> &[HashValue]
Returns the siblings.
Trait Implementations§
§impl Arbitrary for SparseMerkleRangeProof
impl Arbitrary for SparseMerkleRangeProof
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<SparseMerkleRangeProof>
type Strategy = BoxedStrategy<SparseMerkleRangeProof>
The type of
Strategy
used to generate values of type Self
.§fn arbitrary_with(
_args: <SparseMerkleRangeProof as Arbitrary>::Parameters
) -> <SparseMerkleRangeProof as Arbitrary>::Strategy
fn arbitrary_with( _args: <SparseMerkleRangeProof as Arbitrary>::Parameters ) -> <SparseMerkleRangeProof as Arbitrary>::Strategy
§impl Clone for SparseMerkleRangeProof
impl Clone for SparseMerkleRangeProof
§fn clone(&self) -> SparseMerkleRangeProof
fn clone(&self) -> SparseMerkleRangeProof
Returns a copy 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 more§impl Debug for SparseMerkleRangeProof
impl Debug for SparseMerkleRangeProof
§impl<'de> Deserialize<'de> for SparseMerkleRangeProof
impl<'de> Deserialize<'de> for SparseMerkleRangeProof
§fn deserialize<__D>(
__deserializer: __D
) -> Result<SparseMerkleRangeProof, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<SparseMerkleRangeProof, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq<SparseMerkleRangeProof> for SparseMerkleRangeProof
impl PartialEq<SparseMerkleRangeProof> for SparseMerkleRangeProof
§fn eq(&self, other: &SparseMerkleRangeProof) -> bool
fn eq(&self, other: &SparseMerkleRangeProof) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for SparseMerkleRangeProof
impl Serialize for SparseMerkleRangeProof
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for SparseMerkleRangeProof
impl StructuralEq for SparseMerkleRangeProof
impl StructuralPartialEq for SparseMerkleRangeProof
Auto Trait Implementations§
impl RefUnwindSafe for SparseMerkleRangeProof
impl Send for SparseMerkleRangeProof
impl Sync for SparseMerkleRangeProof
impl Unpin for SparseMerkleRangeProof
impl UnwindSafe for SparseMerkleRangeProof
Blanket Implementations§
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.