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 Clone for StateProof
impl Clone for StateProof
Source§fn clone(&self) -> StateProof
fn clone(&self) -> StateProof
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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
impl Eq for StateProof
Source§impl PartialEq for StateProof
impl PartialEq for StateProof
Source§impl Serialize for StateProof
impl Serialize for StateProof
impl StructuralPartialEq for StateProof
Auto Trait Implementations§
impl Freeze for StateProof
impl RefUnwindSafe for StateProof
impl Send for StateProof
impl Sync for StateProof
impl Unpin for StateProof
impl UnsafeUnpin for StateProof
impl UnwindSafe for StateProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> TestOnlyHash for T
impl<T> TestOnlyHash for T
Source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.