#[non_exhaustive]pub enum TurnPhase {
Received,
Interpreted,
Reduced,
Executing,
Committed,
Composed,
Delivered,
Failed,
}Expand description
Persisted phase marker of a turn, for crash recovery (spec §23.1).
The pipeline grows phases, so downstream matches need a wildcard arm.
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.
Received
Input accepted and persisted.
Interpreted
A plan was accepted.
Reduced
A reduction plan exists.
Executing
Commands are executing.
Committed
Commands committed.
Composed
Response blocks composed and persisted.
Delivered
Response delivered.
Failed
The turn failed.
Implementations§
Source§impl TurnPhase
impl TurnPhase
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Returns true for Delivered and Failed.
Sourcepub fn effects_may_exist(self) -> bool
pub fn effects_may_exist(self) -> bool
Returns true once commands may have executed; recovery must resume by
idempotency key instead of re-interpreting (spec §23.1).
Trait Implementations§
impl Copy for TurnPhase
Source§impl<'de> Deserialize<'de> for TurnPhase
impl<'de> Deserialize<'de> for TurnPhase
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 TurnPhase
Source§impl Ord for TurnPhase
impl Ord for TurnPhase
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 PartialOrd for TurnPhase
impl PartialOrd for TurnPhase
impl StructuralPartialEq for TurnPhase
Auto Trait Implementations§
impl Freeze for TurnPhase
impl RefUnwindSafe for TurnPhase
impl Send for TurnPhase
impl Sync for TurnPhase
impl Unpin for TurnPhase
impl UnsafeUnpin for TurnPhase
impl UnwindSafe for TurnPhase
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.