Struct diem_sdk::types::state_proof::StateProof
pub struct StateProof { /* private fields */ }
Expand description
A convenience type for the collection of sub-proofs that consistitute a
response to a get_state_proof
request.
From a StateProof
response, a client should be able to ratchet their
TrustedState
to the last epoch change LI in the EpochChangeProof
or the latest LedgerInfoWithSignatures
if the epoch changes get them into
the most recent epoch.
Implementations§
§impl StateProof
impl StateProof
pub fn new( latest_li_w_sigs: LedgerInfoWithSignatures, epoch_changes: EpochChangeProof, consistency_proof: AccumulatorConsistencyProof ) -> StateProof
pub fn into_inner( self ) -> (LedgerInfoWithSignatures, EpochChangeProof, AccumulatorConsistencyProof)
pub fn as_inner( &self ) -> (&LedgerInfoWithSignatures, &EpochChangeProof, &AccumulatorConsistencyProof)
pub fn latest_ledger_info(&self) -> &LedgerInfo
pub fn latest_ledger_info_w_sigs(&self) -> &LedgerInfoWithSignatures
pub fn epoch_changes(&self) -> &EpochChangeProof
pub fn consistency_proof(&self) -> &AccumulatorConsistencyProof
Trait Implementations§
§impl Arbitrary for StateProof
impl Arbitrary for StateProof
§type Parameters = (<LedgerInfoWithSignatures as Arbitrary>::Parameters, <EpochChangeProof as Arbitrary>::Parameters, <AccumulatorConsistencyProof as Arbitrary>::Parameters)
type Parameters = (<LedgerInfoWithSignatures as Arbitrary>::Parameters, <EpochChangeProof as Arbitrary>::Parameters, <AccumulatorConsistencyProof as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<(<LedgerInfoWithSignatures as Arbitrary>::Strategy, <EpochChangeProof as Arbitrary>::Strategy, <AccumulatorConsistencyProof as Arbitrary>::Strategy), fn(_: (LedgerInfoWithSignatures, EpochChangeProof, AccumulatorConsistencyProof)) -> StateProof>
type Strategy = Map<(<LedgerInfoWithSignatures as Arbitrary>::Strategy, <EpochChangeProof as Arbitrary>::Strategy, <AccumulatorConsistencyProof as Arbitrary>::Strategy), fn(_: (LedgerInfoWithSignatures, EpochChangeProof, AccumulatorConsistencyProof)) -> StateProof>
The type of
Strategy
used to generate values of type Self
.§fn arbitrary_with(
_top: <StateProof as Arbitrary>::Parameters
) -> <StateProof as Arbitrary>::Strategy
fn arbitrary_with( _top: <StateProof as Arbitrary>::Parameters ) -> <StateProof as Arbitrary>::Strategy
§impl Clone for StateProof
impl Clone for StateProof
§fn clone(&self) -> StateProof
fn clone(&self) -> StateProof
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 StateProof
impl Debug for StateProof
§impl<'de> Deserialize<'de> for StateProof
impl<'de> Deserialize<'de> for StateProof
§fn deserialize<__D>(
__deserializer: __D
) -> Result<StateProof, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<StateProof, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq<StateProof> for StateProof
impl PartialEq<StateProof> for StateProof
§fn eq(&self, other: &StateProof) -> bool
fn eq(&self, other: &StateProof) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for StateProof
impl Serialize for StateProof
§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 TryFrom<&StateProof> for StateProofView
impl TryFrom<&StateProof> for StateProofView
§fn try_from(
proof: &StateProof
) -> Result<StateProofView, <StateProofView as TryFrom<&StateProof>>::Error>
fn try_from( proof: &StateProof ) -> Result<StateProofView, <StateProofView as TryFrom<&StateProof>>::Error>
Performs the conversion.
§impl TryFrom<&StateProofView> for StateProof
impl TryFrom<&StateProofView> for StateProof
§fn try_from(
view: &StateProofView
) -> Result<StateProof, <StateProof as TryFrom<&StateProofView>>::Error>
fn try_from( view: &StateProofView ) -> Result<StateProof, <StateProof as TryFrom<&StateProofView>>::Error>
Performs the conversion.
impl Eq for StateProof
impl StructuralEq for StateProof
impl StructuralPartialEq for StateProof
Auto Trait Implementations§
impl RefUnwindSafe for StateProof
impl Send for StateProof
impl Sync for StateProof
impl Unpin for StateProof
impl UnwindSafe for StateProof
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.