pub struct Supplementary<'a> {
pub execution: &'a Execution,
pub named: &'a str,
pub after_evidence: Containment,
pub in_presented: Containment,
}Expand description
A record read beside the verdict’s own execution, which may weaken it and never strengthens it.
Its two containments are computed by the caller with git::contains, so that
weakened_by stays pure: after_evidence is whether the record’s commit contains the
evidence commit, in_presented whether the presented commit contains the record’s.
use majordomus_cli::evidence::freshness::{Supplementary, UNCOMMITTED_RUN};
use majordomus_cli::evidence::Execution;
use majordomus_cli::git::Containment;
let e: Execution = serde_json::from_value(serde_json::json!({
"test": "suite:07_scope", "runner": "suite", "source": "test/cases/07_scope.sh",
"outcome": "fail", "seconds": 1, "commit": "b".repeat(40), "working_tree": "clean",
"digest": "sha256:0", "at": "2026-09-26T00:00:00Z", "origin": "local",
"command": "bash test/run.sh 07_scope"
}))
.unwrap();
let record = Supplementary {
execution: &e,
named: UNCOMMITTED_RUN,
after_evidence: Containment::Contains,
in_presented: Containment::Contains,
};
assert_eq!(record.named, "an uncommitted run in the working ledger");Fields§
§execution: &'a ExecutionThe record’s execution.
named: &'a strHow a detail names the record, for example UNCOMMITTED_RUN.
after_evidence: ContainmentWhether the record’s commit contains the evidence commit: a record from before the evidence says nothing against it.
in_presented: ContainmentWhether the presented commit contains the record’s: a record from another history says nothing about this one.
Trait Implementations§
Source§impl<'a> Clone for Supplementary<'a>
impl<'a> Clone for Supplementary<'a>
Source§fn clone(&self) -> Supplementary<'a>
fn clone(&self) -> Supplementary<'a>
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 moreimpl<'a> Copy for Supplementary<'a>
Auto Trait Implementations§
impl<'a> Freeze for Supplementary<'a>
impl<'a> RefUnwindSafe for Supplementary<'a>
impl<'a> Send for Supplementary<'a>
impl<'a> Sync for Supplementary<'a>
impl<'a> Unpin for Supplementary<'a>
impl<'a> UnsafeUnpin for Supplementary<'a>
impl<'a> UnwindSafe for Supplementary<'a>
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