pub struct CritiqueFinding {
pub id: String,
pub class: Option<CritiqueClass>,
pub class_text: String,
pub subject: String,
pub finding: String,
pub blocking: bool,
pub resolution: Option<ResolutionState>,
pub resolution_text: String,
pub issue: String,
pub because: String,
}Expand description
One critique finding: what the review found, what it is about, whether it blocks execution,
and how it was resolved. class and resolution are None when the record spells one this
module does not know, and the _text fields keep what was written.
use majordomus_cli::intent_review::{CritiqueFinding, CritiqueRecord, ResolutionState};
let c = CritiqueRecord::from_metadata("c.yaml", &serde_json::json!({
"intent": "x",
"findings": [{"id": "f1", "class": "regression_risk", "subject": "x#a",
"blocking": true, "resolution": {"state": "planned", "issue": "I1"}}],
}));
let finding: &CritiqueFinding = &c.findings[0];
assert!(finding.blocking);
assert_eq!(finding.resolution, Some(ResolutionState::Planned));
assert_eq!(finding.issue, "I1");Fields§
§id: StringUnique within the critique.
class: Option<CritiqueClass>The class, or None for a class this module does not know.
class_text: StringAs written.
subject: String<intent>#<criterion>, an issue id or a milestone id.
finding: StringThe finding.
blocking: boolWhether execution may not start while it is open.
resolution: Option<ResolutionState>The resolution, or None for a state this module does not know.
resolution_text: StringAs written.
issue: StringThe issue that carries it, when planned.
because: StringWhy, when rejected.
Trait Implementations§
Source§impl Clone for CritiqueFinding
impl Clone for CritiqueFinding
Source§fn clone(&self) -> CritiqueFinding
fn clone(&self) -> CritiqueFinding
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 CritiqueFinding
impl Debug for CritiqueFinding
Source§impl<'de> Deserialize<'de> for CritiqueFinding
impl<'de> Deserialize<'de> for CritiqueFinding
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 CritiqueFinding
Source§impl JsonSchema for CritiqueFinding
impl JsonSchema for CritiqueFinding
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 CritiqueFinding
impl PartialEq for CritiqueFinding
Source§fn eq(&self, other: &CritiqueFinding) -> bool
fn eq(&self, other: &CritiqueFinding) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CritiqueFinding
impl Serialize for CritiqueFinding
impl StructuralPartialEq for CritiqueFinding
Auto Trait Implementations§
impl Freeze for CritiqueFinding
impl RefUnwindSafe for CritiqueFinding
impl Send for CritiqueFinding
impl Sync for CritiqueFinding
impl Unpin for CritiqueFinding
impl UnsafeUnpin for CritiqueFinding
impl UnwindSafe for CritiqueFinding
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.