#[non_exhaustive]pub enum LoadErrorKind {
Show 15 variants
Unreadable {
path: PathBuf,
message: String,
},
NotASchema,
BothMarkers,
SpecUnknown {
spelling: String,
},
Missing {
key: String,
},
EntryIsBoth,
NotText {
key: String,
spelling: String,
},
NotAMapping {
spelling: String,
},
NotAList {
spelling: String,
},
PatternUnreadable {
text: String,
error: PatternError,
},
UnknownType {
name: String,
suggestion: Option<&'static str>,
},
UnknownSeverity {
spelling: String,
},
FromAndInline,
NotAVocabulary {
path: PathBuf,
},
Cycle {
chain: Vec<PathBuf>,
},
}Expand description
The kind of a LoadError.
#[non_exhaustive]: the loader learns to refuse more as the format grows,
so a match needs a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unreadable
The reader could not produce a document: the file is missing, is not a format it reads, or does not parse. The message is the reader’s.
Fields
NotASchema
Neither a schema nor a vocabulary key at the top level, so this is
neither a schema document nor a vocabulary document.
BothMarkers
Both a schema and a vocabulary key, which the format refuses rather
than guessing which the author meant.
SpecUnknown
schema.spec is a version of the format this crate does not read.
Missing
A key the format requires is missing — spec, at, kind, message,
field.
EntryIsBoth
An entry in rules that has both at and include.
NotText
A value that has to be text and is not — an at, an include, a
type, a kind, a from, a message.
NotAMapping
A value that has to be a mapping and is not — rules[i], schema,
constraint, an on_change entry.
NotAList
rules is not a list.
PatternUnreadable
An at (or a vocabulary document’s field) the pattern grammar
cannot read.
UnknownType
A type naming no type the format defines.
Fields
UnknownSeverity
A severity naming none of notice, confirm, confirm_explicitly.
FromAndInline
A vocabulary constraint with both from and inline values/terms.
NotAVocabulary
A from whose document is not a vocabulary document.
Cycle
An include that reaches a document already being loaded.