#[non_exhaustive]pub enum InstructionStatus {
New,
Accepted,
Rejected,
Revoked,
Started,
Succeeded,
Aborted,
}Expand description
What became of an instruction.
The order in which these must be sent is not documented ([s2-json #26],
erratum E11), so the session ledger accepts any order and warns
only on a regression.
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.
New
Newly created.
Accepted
Accepted.
Rejected
Rejected.
Revoked
Revoked.
Started
Execution started.
Succeeded
Finished successfully.
Aborted
Aborted.
Implementations§
Source§impl InstructionStatus
impl InstructionStatus
Sourcepub const fn is_terminal(self) -> bool
pub const fn is_terminal(self) -> bool
Whether no further status can follow.
Sourcepub const fn progress_rank(self) -> u8
pub const fn progress_rank(self) -> u8
How far through the lifecycle this status is, for detecting a regression.
Trait Implementations§
Source§impl Clone for InstructionStatus
impl Clone for InstructionStatus
impl Copy for InstructionStatus
Source§impl Debug for InstructionStatus
impl Debug for InstructionStatus
Source§impl<'de> Deserialize<'de> for InstructionStatus
impl<'de> Deserialize<'de> for InstructionStatus
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 InstructionStatus
Source§impl Hash for InstructionStatus
impl Hash for InstructionStatus
Source§impl Ord for InstructionStatus
impl Ord for InstructionStatus
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for InstructionStatus
impl PartialEq for InstructionStatus
Source§impl PartialOrd for InstructionStatus
impl PartialOrd for InstructionStatus
Source§impl Serialize for InstructionStatus
impl Serialize for InstructionStatus
impl StructuralPartialEq for InstructionStatus
Auto Trait Implementations§
impl Forget for InstructionStatus
impl Freeze for InstructionStatus
impl Move for InstructionStatus
impl RefUnwindSafe for InstructionStatus
impl Send for InstructionStatus
impl Sync for InstructionStatus
impl Unpin for InstructionStatus
impl UnsafeUnpin for InstructionStatus
impl UnwindSafe for InstructionStatus
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.