pub enum RunStatus {
Running,
Waiting,
Done,
}Expand description
Coarse run lifecycle status persisted in thread state.
Variants§
Running
Run is actively executing.
Waiting
Run is waiting for external decisions.
Done
Run has reached a terminal state.
Implementations§
Source§impl RunStatus
impl RunStatus
Sourcepub const ASCII_STATE_MACHINE: &str = r#"start
|
v
running -------> done
|
v
waiting -------> done
|
+-----------> running"#
pub const ASCII_STATE_MACHINE: &str = r#"start | v running -------> done | v waiting -------> done | +-----------> running"#
Canonical run-lifecycle state machine used by runtime tests.
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Whether this lifecycle status is terminal.
Sourcepub fn can_transition_to(self, next: Self) -> bool
pub fn can_transition_to(self, next: Self) -> bool
Validate lifecycle transition from self to next.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunStatus
impl<'de> Deserialize<'de> for RunStatus
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 Copy for RunStatus
impl Eq for RunStatus
impl StructuralPartialEq for RunStatus
Auto Trait Implementations§
impl Freeze for RunStatus
impl RefUnwindSafe for RunStatus
impl Send for RunStatus
impl Sync for RunStatus
impl Unpin for RunStatus
impl UnsafeUnpin for RunStatus
impl UnwindSafe for RunStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.