#[non_exhaustive]pub enum DeclErrorKind {
Syntax {
line: u32,
col: u32,
},
TooLarge,
TooDeep,
NotDecls,
UnsupportedVersion(i64),
MissingField,
WrongType,
InvalidType(String),
InvalidValue,
Registry(RegistryError),
}Expand description
The reason a declaration file could not be read.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Syntax
Cannot be read as JSON (positions are 1-based).
TooLarge
The input is too large (MAX_DECLS_BYTES).
TooDeep
The JSON nesting is too deep (MAX_JSON_DEPTH), or the nesting of a type name is too deep.
NotDecls
Not a declaration file (the whole is not an object, or format is not "yomi-decls").
UnsupportedVersion(i64)
A declaration file with a version that cannot be read.
MissingField
A required item is missing.
WrongType
The JSON type of an item does not match.
InvalidType(String)
A type name is invalid (an unregistered type, or an unreadable notation). The value is the string as written.
InvalidValue
A value is invalid (an unknown kind, a default that does not match the type, and so on).
Registry(RegistryError)
Invalid as a registry (colliding names, errors in type declarations, and so on).
Implementations§
Trait Implementations§
Source§impl Clone for DeclErrorKind
impl Clone for DeclErrorKind
Source§impl Debug for DeclErrorKind
impl Debug for DeclErrorKind
impl Eq for DeclErrorKind
Source§impl PartialEq for DeclErrorKind
impl PartialEq for DeclErrorKind
impl StructuralPartialEq for DeclErrorKind
Auto Trait Implementations§
impl Forget for DeclErrorKind
impl Freeze for DeclErrorKind
impl Move for DeclErrorKind
impl RefUnwindSafe for DeclErrorKind
impl Send for DeclErrorKind
impl Sync for DeclErrorKind
impl Unpin for DeclErrorKind
impl UnsafeUnpin for DeclErrorKind
impl UnwindSafe for DeclErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more