Skip to main content

TransactionState

Enum TransactionState 

Source
#[non_exhaustive]
pub enum TransactionState {
Show 15 variants Created, Running, VirtualComplete, Denied, AutoApproved, PendingApproval, Approved, Reserved, Revalidating, Committing, Committed, Stale, Expired, RecoveryRequired, Failed,
}
Expand description

A persisted transaction state.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Created

The transaction record exists but execution has not started.

§

Running

The untrusted program is executing against virtual state.

§

VirtualComplete

Virtual execution and canonical diff generation completed.

§

Denied

Deterministic policy denied the transaction.

§

AutoApproved

Deterministic policy approved the transaction without a judge.

§

PendingApproval

The transaction is awaiting an independent approval decision.

§

Approved

An independent principal approved the exact transaction.

§

Reserved

The transaction acquired the single-use commit reservation.

§

Revalidating

Recorded dependencies are being revalidated.

§

Committing

The trusted committer is applying the canonical diff.

§

Committed

The committed host state passed verification.

§

Stale

Revalidation detected stale state before commit.

§

Expired

Approval expired before reservation.

§

RecoveryRequired

Recovery is required after an interrupted commit.

§

Failed

The transaction failed without a successful commit.

Implementations§

Source§

impl TransactionState

Source

pub const fn can_transition_to(self, next: Self) -> bool

Return whether next is a valid persisted state transition.

Source

pub const fn is_terminal(self) -> bool

Return whether no normal transition may leave this state.

Trait Implementations§

Source§

impl Clone for TransactionState

Source§

fn clone(&self) -> TransactionState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TransactionState

Source§

impl Debug for TransactionState

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for TransactionState

Source§

impl PartialEq for TransactionState

Source§

fn eq(&self, other: &TransactionState) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TransactionState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.