pub enum RunState {
Running,
WaitingHuman,
Yellow {
at: Timestamp,
},
Green {
at: Timestamp,
},
Red {
at: Timestamp,
},
Error {
at: Timestamp,
error: Option<String>,
},
Incomplete {
at: Timestamp,
error: Option<String>,
},
}Expand description
Run completion data exists only in a finished lifecycle state.
Variants§
Running
WaitingHuman
Still open with a sign-off request unsubmitted. Readers derive it from the Run’s
requests (RunStatus::with_signoffs); it is never saved, and an open Run is saved
RUNNING. The Run ends once nothing but unclaimed sign-offs is left for its idle grace.
Yellow
Ended with every result but its sign-offs GREEN and a sign-off unsubmitted.
Green
Red
Error
Incomplete
Implementations§
Source§impl RunState
impl RunState
pub fn status(&self) -> RunStatus
Sourcepub fn with_signoffs(self, signoff_open: bool) -> Self
pub fn with_signoffs(self, signoff_open: bool) -> Self
The state readers show while signoff_open says whether a sign-off request of the Run
is unsubmitted; an ended Run keeps its own.
pub fn completed_at(&self) -> Option<Timestamp>
pub fn error(&self) -> Option<&str>
Trait Implementations§
Auto Trait Implementations§
impl Forget for RunState
impl Freeze for RunState
impl Move 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