pub struct GapCondition {
pub criterion: String,
pub state: Option<ConditionState>,
pub state_text: String,
pub because: String,
pub observations: Vec<String>,
}Expand description
One criterion’s state against the observations, as the record spells it. state is None
when the file names a state this module does not know, and state_text keeps what was
written so the finding can quote it.
use majordomus_cli::intent_review::{ConditionState, GapCondition};
let c = GapCondition {
criterion: "criteria-are-covered".into(),
state: Some(ConditionState::Missing),
state_text: "missing".into(),
because: "nothing relates a criterion to an issue".into(),
observations: vec!["no-serves-field".into()],
};
assert_eq!(c.state, Some(ConditionState::Missing));
assert!(!c.observations.is_empty());Fields§
§criterion: StringThe criterion id of the intent.
state: Option<ConditionState>The state, or None when the record spells one this module does not know.
state_text: StringAs written, so a finding can quote an unknown state.
because: StringWhy.
observations: Vec<String>The observation ids it rests on.
Trait Implementations§
Source§impl Clone for GapCondition
impl Clone for GapCondition
Source§fn clone(&self) -> GapCondition
fn clone(&self) -> GapCondition
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 GapCondition
impl Debug for GapCondition
Source§impl<'de> Deserialize<'de> for GapCondition
impl<'de> Deserialize<'de> for GapCondition
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
impl Eq for GapCondition
Source§impl JsonSchema for GapCondition
impl JsonSchema for GapCondition
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 moreSource§impl PartialEq for GapCondition
impl PartialEq for GapCondition
Source§fn eq(&self, other: &GapCondition) -> bool
fn eq(&self, other: &GapCondition) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for GapCondition
impl Serialize for GapCondition
impl StructuralPartialEq for GapCondition
Auto Trait Implementations§
impl Freeze for GapCondition
impl RefUnwindSafe for GapCondition
impl Send for GapCondition
impl Sync for GapCondition
impl Unpin for GapCondition
impl UnsafeUnpin for GapCondition
impl UnwindSafe for GapCondition
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.