pub struct Evidence {
pub state: EvidenceState,
pub meaning: String,
pub artifacts: Vec<ClaimedArtifact>,
pub proof: Option<ProofRef>,
}Expand description
What can be said about an object’s enforcement without running anything.
meaning travels with state so that every surface shows the same sentence about it:
a badge alone invites each renderer to write its own gloss, and the gloss is where a
“resolved” quietly becomes a “passing”. A kind that names no artefact is Unclaimed
with an empty artifacts, which is an answer and not an omission.
use majordomus_cli::capability::builtin::entity::{Evidence, EvidenceState};
let e = Evidence {
state: EvidenceState::Unclaimed,
meaning: "This object names no executable artefact.".into(),
artifacts: Vec::new(),
proof: None,
};
// the empty collections are omitted from the wire, so absence reads as absence
let wire = serde_json::to_value(&e).unwrap();
assert_eq!(wire["state"], serde_json::json!("unclaimed"));
assert!(wire.get("artifacts").is_none());
assert!(wire.get("proof").is_none());Fields§
§state: EvidenceStateThe state, which is never rounded up.
meaning: StringThat state in one sentence, for a reader.
artifacts: Vec<ClaimedArtifact>Every artefact named, with whether the tree holds it.
proof: Option<ProofRef>The capability that can say more, when this kind has one.
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.