pub struct Observations {Show 19 fields
pub repository: String,
pub generated_at: String,
pub now: i64,
pub resolution: Resolution,
pub git: Option<GitObservation>,
pub episode: Option<EpisodeObservation>,
pub task: Option<TaskObservation>,
pub handover: Option<HandoverObservation>,
pub continuity: Option<ContinuityObservation>,
pub policy: PolicyObservation,
pub rules: RulesObservation,
pub adrs: Option<usize>,
pub server: ServerObservation,
pub peers: Result<PeersObservation, String>,
pub ledger: LedgerObservation,
pub coverage: CoverageObservation,
pub generation: GenerationObservation,
pub projections: Vec<(String, ProjectionState)>,
pub deployment: DeploymentObservation,
}Expand description
Everything derive() decides from. Plain data: a test builds one by hand.
use majordomus_cli::environment::preflight::{derive, GitObservation, Observations, Verdict};
let mut o = Observations::empty("demo", 0);
o.git = Some(GitObservation { branch: Some("main".into()), head: Some("a".repeat(40)), clean: true, changed: 0 });
assert_eq!(derive(&o).check("repository.git").unwrap().verdict, Verdict::Active);Fields§
§repository: StringThe repository’s name.
generated_at: StringWhen they were taken, RFC 3339.
now: i64The same instant, seconds since the epoch.
resolution: ResolutionHow the environment was resolved.
git: Option<GitObservation>Version control.
episode: Option<EpisodeObservation>The open episode.
task: Option<TaskObservation>The task record.
handover: Option<HandoverObservation>The handover a resuming worker would get.
continuity: Option<ContinuityObservation>What other devices published that could be resumed here; None when the
continuity commands never ran in this checkout.
policy: PolicyObservationThe policy.
rules: RulesObservationThe rule tally.
adrs: Option<usize>Architecture decisions the index holds, when counted.
server: ServerObservationThe shared server.
peers: Result<PeersObservation, String>The peer board; None with the reason when it was not asked.
ledger: LedgerObservationThe evidence ledger.
coverage: CoverageObservationThe last recorded coverage measurement.
generation: GenerationObservationThe last recorded generation check.
projections: Vec<(String, ProjectionState)>Provider projections against their templates.
deployment: DeploymentObservationThe deployment ref.
Implementations§
Trait Implementations§
Source§impl Clone for Observations
impl Clone for Observations
Source§fn clone(&self) -> Observations
fn clone(&self) -> Observations
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 Observations
impl Debug for Observations
impl Eq for Observations
Source§impl PartialEq for Observations
impl PartialEq for Observations
Source§fn eq(&self, other: &Observations) -> bool
fn eq(&self, other: &Observations) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Observations
Auto Trait Implementations§
impl Freeze for Observations
impl RefUnwindSafe for Observations
impl Send for Observations
impl Sync for Observations
impl Unpin for Observations
impl UnsafeUnpin for Observations
impl UnwindSafe for Observations
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.