pub enum AamlError {
Show 15 variants
IoError {
details: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
ParseError {
line: usize,
content: String,
details: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
NotFound {
key: String,
context: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
InvalidValue {
details: String,
expected: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
InvalidType {
type_name: String,
details: String,
provided: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
DirectiveError {
directive: String,
message: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
SchemaValidationError {
schema: String,
field: String,
type_name: String,
details: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
MissingRequiredField {
schema: String,
field: String,
field_type: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
CircularDependency {
path: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
TypeRegistrationConflict {
type_name: String,
existing: String,
new: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
NestingDepthExceeded {
depth: usize,
context: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
MalformedLiteral {
literal_type: String,
content: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
DirectiveSyntaxError {
directive: String,
provided_syntax: String,
expected_syntax: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
TypeConversionError {
from_type: String,
to_type: String,
value: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
LexError {
line: usize,
column: usize,
character: String,
diagnostics: Option<Box<ErrorDiagnostics>>,
},
}Expand description
All errors that can be produced while parsing or validating an AAML document.
Variants§
IoError
An I/O error occurred while reading a file.
ParseError
A line could not be parsed as a valid AAML statement.
Fields
diagnostics: Option<Box<ErrorDiagnostics>>Diagnostic guidance.
NotFound
A key or type name was not found in the registry or map.
InvalidValue
A value does not satisfy a basic type constraint (not schema-specific).
InvalidType
A value failed validation against a registered or built-in type.
Fields
diagnostics: Option<Box<ErrorDiagnostics>>Diagnostic guidance.
DirectiveError
A directive (@import, @derive, …) encountered an error in its arguments.
SchemaValidationError
A schema constraint was violated during parsing or explicit validation.
Fields
diagnostics: Option<Box<ErrorDiagnostics>>Diagnostic guidance.
MissingRequiredField
Missing the required field in schema.
CircularDependency
Circular dependency detected.
TypeRegistrationConflict
Type registration conflict.
NestingDepthExceeded
Nesting depth exceeded (possible infinite loop).
MalformedLiteral
Malformed inline object or array literal.
DirectiveSyntaxError
Directive syntax is incorrect.
Fields
diagnostics: Option<Box<ErrorDiagnostics>>TypeConversionError
Type conversion failed.
LexError
Lexical analysis error (invalid character or token).
Implementations§
Source§impl AamlError
impl AamlError
Sourcepub fn short_message(&self) -> String
pub fn short_message(&self) -> String
Get the primary error message (short form).
Sourcepub fn diagnostics(&self) -> Option<&ErrorDiagnostics>
pub fn diagnostics(&self) -> Option<&ErrorDiagnostics>
Get the detailed diagnostics if available.
Trait Implementations§
Source§impl Error for AamlError
impl Error for AamlError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AamlError
impl RefUnwindSafe for AamlError
impl Send for AamlError
impl Sync for AamlError
impl Unpin for AamlError
impl UnsafeUnpin for AamlError
impl UnwindSafe for AamlError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.