pub struct AdvisoryWarning {
pub field: String,
pub index: Option<usize>,
pub reason: String,
}Expand description
A machine-readable warning that one advisory report field (or one element of
an advisory array) was dropped during lenient sanitization
(issue merge-report-schema-lenience).
Emitted by sanitize_report_advisory and surfaced in run merge’s JSON
envelope so an agent reads a structured record of what was discarded instead
of regex-parsing prose. The dropped data was never correctness-bearing (see
sanitize_report_advisory for the strict/advisory split), so a warning —
not a rejected merge — is the right severity.
Fields§
§field: StringThe advisory field the drop applies to, e.g. spinoff_proposals.
index: Option<usize>The element index dropped, when the field itself was kept but one element
was invalid. Absent (None) when the entire field was dropped (e.g. it was
present but not an array).
reason: StringHuman-readable reason — the underlying ReportValidationError rendered.
Implementations§
Source§impl AdvisoryWarning
impl AdvisoryWarning
Sourcepub fn to_message(&self) -> String
pub fn to_message(&self) -> String
Render as a single human-readable line for the CLI’s warnings string list,
e.g. dropped spinoff_proposals[0]: … must be a non-empty string.
Trait Implementations§
Source§impl Clone for AdvisoryWarning
impl Clone for AdvisoryWarning
Source§fn clone(&self) -> AdvisoryWarning
fn clone(&self) -> AdvisoryWarning
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more