pub struct ValidationInput {
pub conclusion: String,
pub check: String,
pub command: Option<String>,
pub outcome: ValidationOutcome,
pub evidence: Vec<ReasoningEvidence>,
}Expand description
A step of a conclusion’s validation plan, performed.
It names the conclusion it validates, what was checked, optionally the command, and how it came out. The store refuses one whose conclusion is not recorded or whose check is empty.
use majordomus_cli::reasoning::record::{ValidationInput, ValidationOutcome};
let v: ValidationInput = serde_json::from_value(serde_json::json!({
"conclusion": "conclusion-1",
"check": "the worker test passes",
"command": "cargo test worker",
"outcome": "pass",
}))
.unwrap();
assert_eq!(v.outcome, ValidationOutcome::Pass);
assert_eq!(v.command.as_deref(), Some("cargo test worker"));Fields§
§conclusion: StringThe conclusion validated.
check: StringWhat was checked, in one line.
command: Option<String>The command that checked it.
outcome: ValidationOutcomeHow it came out.
evidence: Vec<ReasoningEvidence>What it produced.
Trait Implementations§
Source§impl Clone for ValidationInput
impl Clone for ValidationInput
Source§fn clone(&self) -> ValidationInput
fn clone(&self) -> ValidationInput
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 ValidationInput
impl Debug for ValidationInput
Source§impl<'de> Deserialize<'de> for ValidationInput
impl<'de> Deserialize<'de> for ValidationInput
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 ValidationInput
impl JsonSchema for ValidationInput
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 ValidationInput
impl RefUnwindSafe for ValidationInput
impl Send for ValidationInput
impl Sync for ValidationInput
impl Unpin for ValidationInput
impl UnsafeUnpin for ValidationInput
impl UnwindSafe for ValidationInput
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