Struct diem_types::state_proof::StateProof
source · 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§
source§impl StateProof
impl StateProof
pub fn new( latest_li_w_sigs: LedgerInfoWithSignatures, epoch_changes: EpochChangeProof, consistency_proof: AccumulatorConsistencyProof ) -> Self
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§
source§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
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for StateProof
impl Clone for StateProof
source§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 moresource§impl Debug for StateProof
impl Debug for StateProof
source§impl<'de> Deserialize<'de> for StateProof
impl<'de> Deserialize<'de> for StateProof
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<StateProof> for StateProof
impl PartialEq<StateProof> for StateProof
source§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 ==
.source§impl Serialize for StateProof
impl Serialize for StateProof
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> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.