Enum diem_sdk::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

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

Fields of Version

new_state: TrustedState
Epoch

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.

Fields of Epoch

new_state: TrustedStatelatest_epoch_change_li: &'a LedgerInfoWithSignatures
NoChange

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

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

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

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more