Struct diem_sdk::types::proof::definition::EventProof
pub struct EventProof { /* private fields */ }
Expand description
The complete proof used to authenticate a contract event. This structure consists of the
AccumulatorProof
from LedgerInfo
to TransactionInfo
, the TransactionInfo
object and the
AccumulatorProof
from event accumulator root to the event.
Implementations§
§impl EventProof
impl EventProof
pub fn new(
transaction_info_with_proof: TransactionInfoWithProof,
transaction_info_to_event_proof: AccumulatorProof<EventAccumulatorHasher>
) -> EventProof
pub fn new( transaction_info_with_proof: TransactionInfoWithProof, transaction_info_to_event_proof: AccumulatorProof<EventAccumulatorHasher> ) -> EventProof
Constructs a new EventProof
using given ledger_info_to_transaction_info_proof
,
transaction_info
and transaction_info_to_event_proof
.
pub fn transaction_info_with_proof(&self) -> &TransactionInfoWithProof
pub fn transaction_info_with_proof(&self) -> &TransactionInfoWithProof
Returns the transaction_info_with_proof
object in this proof.
Trait Implementations§
§impl Arbitrary for EventProof
impl Arbitrary for EventProof
§type Parameters = (<TransactionInfoWithProof as Arbitrary>::Parameters, <AccumulatorProof<EventAccumulatorHasher> as Arbitrary>::Parameters)
type Parameters = (<TransactionInfoWithProof as Arbitrary>::Parameters, <AccumulatorProof<EventAccumulatorHasher> as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<(<TransactionInfoWithProof as Arbitrary>::Strategy, <AccumulatorProof<EventAccumulatorHasher> as Arbitrary>::Strategy), fn(_: (TransactionInfoWithProof, AccumulatorProof<EventAccumulatorHasher>)) -> EventProof>
type Strategy = Map<(<TransactionInfoWithProof as Arbitrary>::Strategy, <AccumulatorProof<EventAccumulatorHasher> as Arbitrary>::Strategy), fn(_: (TransactionInfoWithProof, AccumulatorProof<EventAccumulatorHasher>)) -> EventProof>
The type of
Strategy
used to generate values of type Self
.§fn arbitrary_with(
_top: <EventProof as Arbitrary>::Parameters
) -> <EventProof as Arbitrary>::Strategy
fn arbitrary_with( _top: <EventProof as Arbitrary>::Parameters ) -> <EventProof as Arbitrary>::Strategy
§impl Clone for EventProof
impl Clone for EventProof
§fn clone(&self) -> EventProof
fn clone(&self) -> EventProof
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 EventProof
impl Debug for EventProof
§impl<'de> Deserialize<'de> for EventProof
impl<'de> Deserialize<'de> for EventProof
§fn deserialize<__D>(
__deserializer: __D
) -> Result<EventProof, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<EventProof, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq<EventProof> for EventProof
impl PartialEq<EventProof> for EventProof
§fn eq(&self, other: &EventProof) -> bool
fn eq(&self, other: &EventProof) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for EventProof
impl Serialize for EventProof
§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 EventProof
impl StructuralEq for EventProof
impl StructuralPartialEq for EventProof
Auto Trait Implementations§
impl RefUnwindSafe for EventProof
impl Send for EventProof
impl Sync for EventProof
impl Unpin for EventProof
impl UnwindSafe for EventProof
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.