pub struct PlanPreviewInput {
pub materiality: Option<Materiality>,
pub confidence: Option<ReasoningConfidence>,
pub capabilities: Option<String>,
}Expand description
The input of reasoning.plan: a stated uncertainty, in transport-friendly scalars.
Nothing is recorded; reasoning.record with a plan records one.
use majordomus_cli::capability::builtin::reasoning::PlanPreviewInput;
use majordomus_cli::reasoning::Materiality;
let input: PlanPreviewInput = serde_json::from_value(serde_json::json!({
"materiality": "high", "capabilities": "code_review,security_review",
})).unwrap();
assert_eq!(input.materiality, Some(Materiality::High));
assert!(input.confidence.is_none(), "an absent field takes the policy's default");
assert!(serde_json::from_value::<PlanPreviewInput>(serde_json::json!({ "quorum": 2 })).is_err());Fields§
§materiality: Option<Materiality>trivial, low, material, high or critical.
confidence: Option<ReasoningConfidence>low, medium or high.
capabilities: Option<String>Advisory capabilities review needs, comma-separated.
Trait Implementations§
Source§impl BenchmarkCases for PlanPreviewInput
impl BenchmarkCases for PlanPreviewInput
Source§fn benchmark_cases(_: &CaseContext<'_>) -> Vec<NamedCase<Self>>
fn benchmark_cases(_: &CaseContext<'_>) -> Vec<NamedCase<Self>>
The cases, in a stable order. An empty list means “nothing to benchmark in this
repository”, which the coverage check reports as missing.
Source§fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
The cases as JSON, the shape every runner serialises from.
Source§impl Debug for PlanPreviewInput
impl Debug for PlanPreviewInput
Source§impl Default for PlanPreviewInput
impl Default for PlanPreviewInput
Source§fn default() -> PlanPreviewInput
fn default() -> PlanPreviewInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PlanPreviewInputwhere
PlanPreviewInput: Default,
impl<'de> Deserialize<'de> for PlanPreviewInputwhere
PlanPreviewInput: Default,
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 PlanPreviewInput
impl JsonSchema for PlanPreviewInput
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 PlanPreviewInput
impl RefUnwindSafe for PlanPreviewInput
impl Send for PlanPreviewInput
impl Sync for PlanPreviewInput
impl Unpin for PlanPreviewInput
impl UnsafeUnpin for PlanPreviewInput
impl UnwindSafe for PlanPreviewInput
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