pub enum RunState {
Queued,
Running,
Paused,
Exited {
code: i32,
},
Stopped,
Failed {
reason: String,
},
}Expand description
Where a run is:
Queued → Running ⇄ Paused
Queued | Running | Paused → Exited | Stopped | FailedVariants§
Queued
Waiting for a runner to take it, or for the one it was sent to to start it.
Running
Paused
Exited
The program exited, with its code.
Stopped
Stopped by its owner.
Failed
Ended by dvm or the platform, not by the program, and why.
Implementations§
Source§impl RunState
impl RunState
Sourcepub fn kind(&self) -> &'static str
pub fn kind(&self) -> &'static str
The state’s name, as the API and the controller’s database spell it.
Sourcepub fn after(&self, action: RunAction) -> Result<Self, InvalidRunAction>
pub fn after(&self, action: RunAction) -> Result<Self, InvalidRunAction>
The state an owner’s action takes the run to, if the action may be taken: a queued run can only be stopped, before it starts.
pub fn allows(&self, action: RunAction) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunState
impl<'de> Deserialize<'de> for RunState
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 RunState
impl StructuralPartialEq for RunState
Auto Trait Implementations§
impl Forget for RunState
impl Freeze for RunState
impl RefUnwindSafe for RunState
impl Send for RunState
impl Sync for RunState
impl Unpin for RunState
impl UnsafeUnpin for RunState
impl UnwindSafe for RunState
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