Enum diem_types::trusted_state::TrustedStateChange[][src]

pub enum TrustedStateChange<'a> {
    Version {
        new_state: TrustedState,
    },
    Epoch {
        new_state: TrustedState,
        latest_epoch_change_li: &'a LedgerInfoWithSignatures,
    },
    NoChange,
}
Expand description

TrustedStateChange is the result of attempting to ratchet to a new trusted state. In order to reduce redundant error checking, TrustedStateChange also contains references to relevant items used to ratchet us.

Variants

Version
Expand description

We have a newer TrustedState but it’s still in the same epoch, so only the latest trusted version changed.

Show fields

Fields of Version

new_state: TrustedState
Epoch
Expand description

We have a newer TrustedState and there was at least one epoch change, so we have a newer trusted version and a newer trusted validator set.

Show fields

Fields of Epoch

new_state: TrustedStatelatest_epoch_change_li: &'a LedgerInfoWithSignatures
NoChange
Expand description

The latest ledger info is at the same version as the trusted state and matches the hash.

Implementations

impl<'a> TrustedStateChange<'a>[src]

Trait Implementations

impl<'a> Clone for TrustedStateChange<'a>[src]

fn clone(&self) -> TrustedStateChange<'a>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for TrustedStateChange<'a>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> RefUnwindSafe for TrustedStateChange<'a>

impl<'a> Send for TrustedStateChange<'a>

impl<'a> Sync for TrustedStateChange<'a>

impl<'a> Unpin for TrustedStateChange<'a>

impl<'a> UnwindSafe for TrustedStateChange<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V