#[non_exhaustive]pub enum ErrorKind {
InvalidCharacter,
Syntax,
}Expand description
The category of a parse error.
Consumers can match on kind to route errors without substring-matching
message text. message remains the authoritative human-readable description.
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.
InvalidCharacter
A character that is not allowed in the current YAML context was found.
Produced wherever the parser rejects a non-printable or otherwise
forbidden codepoint — e.g. U+0001 in a comment body, a \x07 hex
escape in a double-quoted scalar, or a NUL in a directive parameter.
Syntax
A grammar or structural error that is not caused by a specific forbidden character.
Produced for unterminated scalars, bad indentation, duplicate directives, and all other parse failures.
Trait Implementations§
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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