pub struct MeshVerifyCheck {
pub check: String,
pub ok: bool,
pub detail: String,
pub impact: Option<String>,
pub remediation: Option<String>,
}Expand description
One verification check: what was checked, whether it holds, the evidence, and — when something is wrong or limited — the impact and what to do about it.
The impact and the remedy are carried with the verdict rather than left to whoever renders it, so that a failing check is actionable wherever it is read — in a terminal, in a JSON answer, or by an agent that has never seen the mesh before. A check that holds carries neither, because there is nothing to do.
use majordomus_cli::mesh::cooperation::MeshVerifyCheck;
let report = cooperation.verify();
let first: &MeshVerifyCheck = &report.checks[0];
assert_eq!(first.check, "cooperation");
assert!(first.detail.contains(cooperation.runtime_key()), "the evidence, not a verdict");
assert!(first.remediation.is_none(), "a check that holds asks for nothing");Fields§
§check: StringWhat was checked.
ok: boolWhether it holds.
detail: StringThe evidence.
impact: Option<String>What the failure or limitation means for cooperation.
remediation: Option<String>What to do.
Trait Implementations§
Source§impl Clone for MeshVerifyCheck
impl Clone for MeshVerifyCheck
Source§fn clone(&self) -> MeshVerifyCheck
fn clone(&self) -> MeshVerifyCheck
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 MeshVerifyCheck
impl Debug for MeshVerifyCheck
Source§impl<'de> Deserialize<'de> for MeshVerifyCheck
impl<'de> Deserialize<'de> for MeshVerifyCheck
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
Source§impl JsonSchema for MeshVerifyCheck
impl JsonSchema for MeshVerifyCheck
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 moreAuto Trait Implementations§
impl Freeze for MeshVerifyCheck
impl RefUnwindSafe for MeshVerifyCheck
impl Send for MeshVerifyCheck
impl Sync for MeshVerifyCheck
impl Unpin for MeshVerifyCheck
impl UnsafeUnpin for MeshVerifyCheck
impl UnwindSafe for MeshVerifyCheck
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