#[non_exhaustive]pub enum TurnOutcome {
Completed,
Failed {
message: String,
},
Interrupted,
Budget,
LoopGuard {
reason: String,
},
MaxSteps,
CycleHandoff {
next_cycle: u32,
},
}Expand description
Reason a turn ended. Supersedes bare TurnOutcomeStatus with richer
detail so that the state-machine can branch without out-of-band flags.
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.
Implementations§
Source§impl TurnOutcome
impl TurnOutcome
Sourcepub fn as_status(&self) -> TurnOutcomeStatus
pub fn as_status(&self) -> TurnOutcomeStatus
Map to the legacy TurnOutcomeStatus for callers not yet migrated.
Trait Implementations§
Source§impl Clone for TurnOutcome
impl Clone for TurnOutcome
Source§fn clone(&self) -> TurnOutcome
fn clone(&self) -> TurnOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TurnOutcome
impl Debug for TurnOutcome
Source§impl<'de> Deserialize<'de> for TurnOutcome
impl<'de> Deserialize<'de> for TurnOutcome
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 TurnOutcome
Source§impl PartialEq for TurnOutcome
impl PartialEq for TurnOutcome
Source§fn eq(&self, other: &TurnOutcome) -> bool
fn eq(&self, other: &TurnOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TurnOutcome
impl Serialize for TurnOutcome
impl StructuralPartialEq for TurnOutcome
Auto Trait Implementations§
impl Freeze for TurnOutcome
impl RefUnwindSafe for TurnOutcome
impl Send for TurnOutcome
impl Sync for TurnOutcome
impl Unpin for TurnOutcome
impl UnsafeUnpin for TurnOutcome
impl UnwindSafe for TurnOutcome
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