pub struct ReviewFinding {
pub code: String,
pub severity: ReviewSeverity,
pub message: String,
pub evidence: Option<String>,
pub repair_instruction: String,
}Expand description
One actionable issue returned by an output reviewer.
Fields§
§code: StringStable machine-readable finding code.
severity: ReviewSeverityFinding severity.
message: StringConcise explanation of the problem.
evidence: Option<String>Optional candidate evidence locating or demonstrating the problem.
repair_instruction: StringConcrete instruction for the next generation attempt.
Implementations§
Source§impl ReviewFinding
impl ReviewFinding
Sourcepub fn new(
code: impl Into<String>,
severity: ReviewSeverity,
message: impl Into<String>,
repair_instruction: impl Into<String>,
) -> Result<Self, WorkflowReviewError>
pub fn new( code: impl Into<String>, severity: ReviewSeverity, message: impl Into<String>, repair_instruction: impl Into<String>, ) -> Result<Self, WorkflowReviewError>
Creates a validated finding without optional evidence.
§Errors
Returns WorkflowReviewError::InvalidDecision for blank, oversized,
or unstable fields.
Sourcepub fn with_evidence(
self,
evidence: impl Into<String>,
) -> Result<Self, WorkflowReviewError>
pub fn with_evidence( self, evidence: impl Into<String>, ) -> Result<Self, WorkflowReviewError>
Adds bounded evidence to this finding.
§Errors
Returns WorkflowReviewError::InvalidDecision when the evidence is
blank or exceeds 4 KiB.
Trait Implementations§
Source§impl Clone for ReviewFinding
impl Clone for ReviewFinding
Source§fn clone(&self) -> ReviewFinding
fn clone(&self) -> ReviewFinding
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 ReviewFinding
impl Debug for ReviewFinding
Source§impl<'de> Deserialize<'de> for ReviewFinding
impl<'de> Deserialize<'de> for ReviewFinding
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 ReviewFinding
Source§impl JsonSchema for ReviewFinding
impl JsonSchema for ReviewFinding
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 ReviewFinding
impl PartialEq for ReviewFinding
Source§impl Serialize for ReviewFinding
impl Serialize for ReviewFinding
impl StructuralPartialEq for ReviewFinding
Auto Trait Implementations§
impl Freeze for ReviewFinding
impl RefUnwindSafe for ReviewFinding
impl Send for ReviewFinding
impl Sync for ReviewFinding
impl Unpin for ReviewFinding
impl UnsafeUnpin for ReviewFinding
impl UnwindSafe for ReviewFinding
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.