pub struct AdvisorsReport {
pub operational: bool,
pub mode: ModeResolution,
pub available: usize,
pub unavailable: usize,
pub advisors: Vec<AdvisorState>,
pub capacity: Vec<AdvisorCapacity>,
pub diagnostics: Vec<String>,
}Expand description
The answer of reasoning.advisors: the mode in force, how many advisors may and may
not be asked, every advisor’s state, the capacity per advisory capability, and the
catalogue’s own findings. operational is true whatever the counts.
use majordomus_cli::capability::builtin::reasoning::AdvisorsReport;
let report: AdvisorsReport = serde_json::from_value(serde_json::json!({
"operational": true,
"mode": { "mode": "ci", "source": "CI" },
"available": 0, "unavailable": 0, "advisors": [], "capacity": [],
})).unwrap();
assert!(report.operational && report.advisors.is_empty());
assert_eq!(report.mode.source, "CI");
assert!(report.diagnostics.is_empty(), "absent findings are the ordinary case");Fields§
§operational: boolReasoning works whatever the advisors: always true, stated so a reader need not
infer it from a count.
mode: ModeResolutionThe mode in force and what decided it.
available: usizeAdvisors that may be asked now.
Advisors that may not, each optional.
advisors: Vec<AdvisorState>Every advisor, declared ones in preference order, then linked peers.
capacity: Vec<AdvisorCapacity>Per advisory capability, who can provide it now. A row with nobody is answered by the local review path.
diagnostics: Vec<String>The catalogue’s own findings.
Trait Implementations§
Source§impl Debug for AdvisorsReport
impl Debug for AdvisorsReport
Source§impl<'de> Deserialize<'de> for AdvisorsReport
impl<'de> Deserialize<'de> for AdvisorsReport
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 AdvisorsReport
impl JsonSchema for AdvisorsReport
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 AdvisorsReport
impl RefUnwindSafe for AdvisorsReport
impl Send for AdvisorsReport
impl Sync for AdvisorsReport
impl Unpin for AdvisorsReport
impl UnsafeUnpin for AdvisorsReport
impl UnwindSafe for AdvisorsReport
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