pub enum SchemaErrorKind {
UnknownType {
name: String,
suggestion: Option<String>,
},
UnresolvedEnum {
name: String,
},
DuplicateEnum {
name: String,
},
DuplicateVariant {
enum_name: String,
variant: String,
},
DuplicateField {
field_name: String,
},
DuplicateAlias {
name: String,
},
RecursiveAlias {
name: String,
},
UnresolvedType {
name: String,
},
InvalidMapKeyType {
found: String,
},
InvalidDefault {
field_name: String,
expected: String,
found: String,
},
UnexpectedToken {
expected: String,
found: String,
},
}Expand description
Specific kinds of errors that can occur when parsing a .ronschema file.
Variants§
UnknownType
A type name was not recognized (e.g., "Intgeer" instead of "Integer").
Fields
UnresolvedEnum
A type references an enum that is never defined in the schema.
DuplicateEnum
The same enum name is defined more than once.
DuplicateVariant
The same variant appears more than once within an enum definition.
Fields
DuplicateField
The same field name appears more than once within a struct definition.
DuplicateAlias
The same type alias name is defined more than once.
RecursiveAlias
A type alias references itself, directly or indirectly.
UnresolvedType
A PascalCase name could not be resolved to an enum or type alias.
InvalidMapKeyType
A map key type is not valid (must be String, Integer, or an enum type).
InvalidDefault
A default value does not match the field’s declared type.
Fields
UnexpectedToken
A syntax error — the parser encountered a token it did not expect.
Trait Implementations§
Source§impl Clone for SchemaErrorKind
impl Clone for SchemaErrorKind
Source§fn clone(&self) -> SchemaErrorKind
fn clone(&self) -> SchemaErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaErrorKind
impl Debug for SchemaErrorKind
Source§impl PartialEq for SchemaErrorKind
impl PartialEq for SchemaErrorKind
impl Eq for SchemaErrorKind
impl StructuralPartialEq for SchemaErrorKind
Auto Trait Implementations§
impl Freeze for SchemaErrorKind
impl RefUnwindSafe for SchemaErrorKind
impl Send for SchemaErrorKind
impl Sync for SchemaErrorKind
impl Unpin for SchemaErrorKind
impl UnsafeUnpin for SchemaErrorKind
impl UnwindSafe for SchemaErrorKind
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