pub enum Code {
Show 20 variants
Io,
Encoding,
Budget,
Symlink,
UnexpectedFile,
MissingFile,
Path,
NameMismatch,
Format,
UnknownKey,
MissingKey,
Type,
Range,
Identifier,
Duplicate,
Reference,
Cycle,
Grid,
StairwellStep,
StairwellOverlap,
}Expand description
Stable diagnostic codes. JSONC syntax errors use the parser’s own codes.
Variants§
Io
A file could not be read.
Encoding
A file is not UTF-8.
Budget
A load exceeded its file or byte budget.
Symlink
A symbolic link where the format expects a file or directory.
UnexpectedFile
A file or directory the format does not define.
MissingFile
A required file is missing.
Path
A path in a document is not a safe relative path.
NameMismatch
A file name disagrees with the document’s content.
Format
A format value other than the one the document kind requires.
UnknownKey
A key the format or schema does not define.
MissingKey
A required key is missing.
Type
A value of the wrong JSON type.
Range
A value outside its allowed range or set.
Identifier
An identifier that does not match the identifier pattern.
Duplicate
Two entries with the same identity.
Reference
A reference that does not resolve.
Cycle
Zone parents that form a cycle.
Grid
A malformed terrain grid.
StairwellStep
A stairwell step that is not on the layer next to the step before it, in the stairwell’s direction, or that moves more than one tile on an axis.
StairwellOverlap
A tile that holds steps of two stairwells.