pub enum State {
Starting,
Running,
Done,
Failed,
Stopped,
Waiting,
Died,
}Expand description
Where a task is.
Starting and Running are the two that are only true while a process is alive; everything
else is what the child wrote on its way out, and stays.
Variants§
Starting
Spawned, and the child has not written its first line yet.
Running
The child is working.
Done
The turn finished.
Failed
The run stopped with an error, or its process ended without saying why.
Stopped
Stopped on purpose — a signal, or a Ctrl-C in a terminal the person still had.
Waiting
The run parked on an approval nobody was there to answer.
Died
The file says it is running and the process is gone. Never written: always derived.
Implementations§
Source§impl State
impl State
Sourcepub fn alive_only(self) -> bool
pub fn alive_only(self) -> bool
Whether the state is true only while a process is alive.
This is the whole of the pid rule: a task in one of these two states has to have a live
process behind it, and one that does not is State::Died.
Trait Implementations§
impl Copy for State
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
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 State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Forget for State
impl Freeze for State
impl Move for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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,
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.