pub enum ReportValidationError {
Show 22 variants
NotObject,
MissingSuccess,
SuccessNotBoolean,
SummaryNotString,
CancelledNotBoolean,
ReasonNotString,
CancelledRequiresSuccessFalse,
CancelledRequiresReason,
DiscussionItemsNotArray,
DiscussionItemNotObject {
index: usize,
},
DiscussionItemTopicMissing {
index: usize,
},
DiscussionItemSeverityNotString {
index: usize,
},
SpinoffProposalsNotArray,
SpinoffProposalNotObject {
index: usize,
},
SpinoffProposalTitleMissing {
index: usize,
},
SpinoffProposalKindNotString {
index: usize,
},
SpinoffProposalKindUnknown {
index: usize,
kind: String,
},
SpinoffProposalRationaleNotString {
index: usize,
},
FieldNotArray {
field: String,
},
FieldElementNotString {
field: String,
index: usize,
},
PathNotArray {
path: String,
},
PathElementNotString {
path: String,
index: usize,
},
}Expand description
A §7.3 report payload failed structural validation.
Every variant describes one schema violation. The CLI renders these as
a schema_violation error; ReportValidationError::expected supplies
the machine-readable expected hint for the variants that carry one.
Variants§
NotObject
The payload root was not a JSON object.
MissingSuccess
The required success field was absent.
SuccessNotBoolean
success was present but not a boolean.
SummaryNotString
summary was present but not a string (or null).
CancelledNotBoolean
cancelled was present but not a boolean.
ReasonNotString
reason was present but not a string.
CancelledRequiresSuccessFalse
cancelled: true was paired with success: true (§7.7 forbids it).
CancelledRequiresReason
cancelled: true lacked a non-empty reason string (§7.7).
DiscussionItemsNotArray
discussion_items was present but not an array.
DiscussionItemNotObject
A discussion_items element was not a JSON object.
DiscussionItemTopicMissing
A discussion_items element lacked a non-empty topic string.
DiscussionItemSeverityNotString
A discussion_items element’s severity was not a string.
SpinoffProposalsNotArray
spinoff_proposals was present but not an array.
SpinoffProposalNotObject
A spinoff_proposals element was not a JSON object.
SpinoffProposalTitleMissing
A spinoff_proposals element lacked a non-empty proposed_title.
SpinoffProposalKindNotString
A spinoff_proposals element’s proposed_kind was not a string.
SpinoffProposalKindUnknown
A spinoff_proposals element’s proposed_kind was not a known Kind.
SpinoffProposalRationaleNotString
A spinoff_proposals element’s rationale was not a string (or null).
FieldNotArray
A declared string-array field was not an array.
FieldElementNotString
An element of a declared string-array field was not a string.
PathNotArray
A nested path expected to hold a string array was not an array.
PathElementNotString
An element at a nested string-array path was not a string.
Implementations§
Trait Implementations§
Source§impl Debug for ReportValidationError
impl Debug for ReportValidationError
Source§impl Display for ReportValidationError
impl Display for ReportValidationError
Source§impl Error for ReportValidationError
impl Error for ReportValidationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()