Struct diem_sdk::types::proof::AccumulatorProof
pub struct AccumulatorProof<H> { /* private fields */ }
Expand description
A proof that can be used authenticate an element in an accumulator given trusted root hash. For
example, both LedgerInfoToTransactionInfoProof
and TransactionInfoToEventProof
can be
constructed on top of this structure.
Implementations§
§impl<H> AccumulatorProof<H>where
H: CryptoHasher,
impl<H> AccumulatorProof<H>where H: CryptoHasher,
pub fn new(siblings: Vec<HashValue, Global>) -> AccumulatorProof<H>
pub fn new(siblings: Vec<HashValue, Global>) -> AccumulatorProof<H>
Constructs a new AccumulatorProof
using a list of siblings.
Trait Implementations§
§impl<H> Arbitrary for AccumulatorProof<H>where
H: CryptoHasher + 'static,
impl<H> Arbitrary for AccumulatorProof<H>where H: CryptoHasher + 'static,
§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<AccumulatorProof<H>>
type Strategy = BoxedStrategy<AccumulatorProof<H>>
The type of
Strategy
used to generate values of type Self
.§fn arbitrary_with(
_args: <AccumulatorProof<H> as Arbitrary>::Parameters
) -> <AccumulatorProof<H> as Arbitrary>::Strategy
fn arbitrary_with( _args: <AccumulatorProof<H> as Arbitrary>::Parameters ) -> <AccumulatorProof<H> as Arbitrary>::Strategy
§impl<H> Clone for AccumulatorProof<H>where
H: Clone,
impl<H> Clone for AccumulatorProof<H>where H: Clone,
§fn clone(&self) -> AccumulatorProof<H>
fn clone(&self) -> AccumulatorProof<H>
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<H> Debug for AccumulatorProof<H>
impl<H> Debug for AccumulatorProof<H>
§impl<'de, H> Deserialize<'de> for AccumulatorProof<H>
impl<'de, H> Deserialize<'de> for AccumulatorProof<H>
§fn deserialize<__D>(
__deserializer: __D
) -> Result<AccumulatorProof<H>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<AccumulatorProof<H>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<H> PartialEq<AccumulatorProof<H>> for AccumulatorProof<H>
impl<H> PartialEq<AccumulatorProof<H>> for AccumulatorProof<H>
§fn eq(&self, other: &AccumulatorProof<H>) -> bool
fn eq(&self, other: &AccumulatorProof<H>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<H> Serialize for AccumulatorProof<H>
impl<H> Serialize for AccumulatorProof<H>
§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<H> Eq for AccumulatorProof<H>
Auto Trait Implementations§
impl<H> RefUnwindSafe for AccumulatorProof<H>where H: RefUnwindSafe,
impl<H> Send for AccumulatorProof<H>where H: Send,
impl<H> Sync for AccumulatorProof<H>where H: Sync,
impl<H> Unpin for AccumulatorProof<H>where H: Unpin,
impl<H> UnwindSafe for AccumulatorProof<H>where H: UnwindSafe,
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.