pub struct Evidence {
pub recorded_at: String,
pub head: String,
pub branch: String,
pub kind: String,
pub command: String,
pub artifact: String,
pub result: String,
pub session: String,
pub inputs_hash: String,
}Expand description
The task.evidence line that discharged an obligation, as the ledger holds it.
Nothing older is consulted: evidence is superseded by evidence, and the ledger keeps the history for a reader that wants it.
use majordomus_cli::capability::builtin::obligations::Evidence;
let e: Evidence = serde_json::from_str(
r#"{"recorded_at":"2026-09-09T21:01:00Z","head":"f00ba7","branch":"master",
"kind":"ci","command":"scripts/ci/reference-check","inputs_hash":"7f68b9"}"#,
)
.unwrap();
assert_eq!(e.head, "f00ba7", "the envelope's commit is what a remote fact is judged against");
assert!(e.artifact.is_empty(), "one of command and artifact; narrative is not evidence");Fields§
§recorded_at: StringWhen the line was appended.
head: StringThe commit the ledger’s envelope stamped on it.
branch: StringThe branch it was recorded on.
kind: StringHow it was taken: test, build, ci, artifact or manual.
command: StringThe command that produced it. Narrative is not evidence, so one of this and
artifact is always present.
artifact: StringThe reference it points at, such as a published URL.
result: StringWhat the command said, when its output was the point.
session: StringThe episode that recorded it, when one was open.
inputs_hash: StringThe hash of the token’s declared inputs at the moment it was taken. Empty for a token that declares none.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Evidence
impl<'de> Deserialize<'de> for Evidence
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Evidence
Source§impl JsonSchema for Evidence
impl JsonSchema for Evidence
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Evidence
Auto Trait Implementations§
impl Freeze for Evidence
impl RefUnwindSafe for Evidence
impl Send for Evidence
impl Sync for Evidence
impl Unpin for Evidence
impl UnsafeUnpin for Evidence
impl UnwindSafe for Evidence
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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.