pub struct TaskObservation {
pub id: String,
pub task: String,
pub outcome: String,
pub started_at: String,
}Expand description
The task record, read from current.yaml through the continuity module’s own reader.
use majordomus_cli::environment::preflight::{derive, Observations, TaskObservation, Verdict};
let mut o = Observations::empty("demo", 0);
o.task = Some(TaskObservation { id: "t-1".into(), outcome: "active".into(), ..Default::default() });
assert_eq!(derive(&o).check("session.task").unwrap().verdict, Verdict::Active);
o.task = Some(TaskObservation { id: "t-1".into(), outcome: "handed_over".into(), ..Default::default() });
assert_eq!(derive(&o).check("session.task").unwrap().verdict, Verdict::NotApplicable);Fields§
§id: StringThe task id.
task: StringWhat it is.
outcome: Stringactive (or empty, for an older record) while it is in progress; the outcome once it
ended.
started_at: StringWhen it started.
Trait Implementations§
Source§impl Clone for TaskObservation
impl Clone for TaskObservation
Source§fn clone(&self) -> TaskObservation
fn clone(&self) -> TaskObservation
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 TaskObservation
impl Debug for TaskObservation
Source§impl Default for TaskObservation
impl Default for TaskObservation
Source§fn default() -> TaskObservation
fn default() -> TaskObservation
Returns the “default value” for a type. Read more
impl Eq for TaskObservation
Source§impl PartialEq for TaskObservation
impl PartialEq for TaskObservation
Source§fn eq(&self, other: &TaskObservation) -> bool
fn eq(&self, other: &TaskObservation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TaskObservation
Auto Trait Implementations§
impl Freeze for TaskObservation
impl RefUnwindSafe for TaskObservation
impl Send for TaskObservation
impl Sync for TaskObservation
impl Unpin for TaskObservation
impl UnsafeUnpin for TaskObservation
impl UnwindSafe for TaskObservation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.