#[non_exhaustive]pub enum IssueKind {
Unknown,
Retired,
Custom(String),
Unchecked(String),
}Expand description
The kind of an Issue.
#[non_exhaustive]: new failure kinds get their own variant as the crate
grows, so a match needs a _ arm. IssueKind::Custom already carries
anything an embedder defines.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
Not a member of the vocabulary.
Retired
A member, but retired.
Custom(String)
An embedder-defined issue (a dangling reference, a range violation, …), carrying its own rendered message.
Unchecked(String)
The value was not checked at all, because the constraint is of a kind this validator does not know — named here, so a reader can say which.
Always carried by a Validation::Reject, never a
Validation::Warn: a validator that skipped a rule cannot answer
“valid”, so it fails closed, and an editor that does not know the kind
must not commit the value. What this variant adds is that a reader who
does know it can tell unchecked from wrong — fig-schema check
files one under its own heading, and exits 3 rather than 1 when nothing
else is amiss. See Issue::unchecked.