pub struct DoneQuestion {
pub id: String,
pub question: String,
pub status: GateStatus,
pub evidence: String,
pub source: String,
pub remediation: String,
}Expand description
use majordomus_cli::gates::{DoneQuestion, GateStatus};
let q = DoneQuestion {
id: "pushed".into(),
question: "Has the commit reached the remote?".into(),
status: GateStatus::Queued,
evidence: "the obligation is owed".into(),
source: "obligation push (obligations.closure)".into(),
remediation: "git push".into(),
};
// every question names what answered it and what would settle it: a question with
// neither is a checklist line, which is the artifact this type exists instead of
assert!(!q.source.is_empty() && !q.remediation.is_empty());
assert!(q.status.unverified());One question of the done invariant, and what answered it.
Fields§
§id: StringThe question’s identity, stable across reports.
question: StringThe question, as a person would ask it.
status: GateStatusThe answer, in the same vocabulary every gate uses.
evidence: StringWhat was actually read — never a restatement of the status.
source: StringWhat answered it: an obligation token, a gate id, or the capability that would.
remediation: StringWhat would settle it, as a command.
Trait Implementations§
Source§impl Clone for DoneQuestion
impl Clone for DoneQuestion
Source§fn clone(&self) -> DoneQuestion
fn clone(&self) -> DoneQuestion
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 DoneQuestion
impl Debug for DoneQuestion
Source§impl<'de> Deserialize<'de> for DoneQuestion
impl<'de> Deserialize<'de> for DoneQuestion
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 DoneQuestion
impl JsonSchema for DoneQuestion
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 DoneQuestion
impl RefUnwindSafe for DoneQuestion
impl Send for DoneQuestion
impl Sync for DoneQuestion
impl Unpin for DoneQuestion
impl UnsafeUnpin for DoneQuestion
impl UnwindSafe for DoneQuestion
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