pub struct EpisodeObservation {
pub id: String,
pub started_at: String,
pub provider: String,
pub start_head: String,
pub start_working_tree: String,
pub this_checkout: bool,
}Expand description
The open episode, read from session-current.yaml, with whether it is this checkout’s.
use majordomus_cli::environment::preflight::{derive, EpisodeObservation, Observations, Verdict};
let mut o = Observations::empty("demo", 0);
o.episode = Some(EpisodeObservation { id: "s-1".into(), this_checkout: false, ..Default::default() });
// an episode another checkout opened is not this work
assert_eq!(derive(&o).check("session.episode").unwrap().verdict, Verdict::Degraded);Fields§
§id: StringThe episode id.
started_at: StringWhen it opened.
provider: StringThe provider that opened it, when one did.
start_head: StringThe commit its briefing was written at.
start_working_tree: Stringclean or dirty when its briefing was written.
this_checkout: boolWhether the record belongs to this checkout.
Trait Implementations§
Source§impl Clone for EpisodeObservation
impl Clone for EpisodeObservation
Source§fn clone(&self) -> EpisodeObservation
fn clone(&self) -> EpisodeObservation
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 EpisodeObservation
impl Debug for EpisodeObservation
Source§impl Default for EpisodeObservation
impl Default for EpisodeObservation
Source§fn default() -> EpisodeObservation
fn default() -> EpisodeObservation
Returns the “default value” for a type. Read more
impl Eq for EpisodeObservation
Source§impl PartialEq for EpisodeObservation
impl PartialEq for EpisodeObservation
Source§fn eq(&self, other: &EpisodeObservation) -> bool
fn eq(&self, other: &EpisodeObservation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EpisodeObservation
Auto Trait Implementations§
impl Freeze for EpisodeObservation
impl RefUnwindSafe for EpisodeObservation
impl Send for EpisodeObservation
impl Sync for EpisodeObservation
impl Unpin for EpisodeObservation
impl UnsafeUnpin for EpisodeObservation
impl UnwindSafe for EpisodeObservation
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.