Struct litrs::ParseError [−][src]
pub struct ParseError { /* fields omitted */ }
Expand description
Errors during parsing.
This type should be seen primarily for error reporting and not for catching specific cases. The span and error kind are not guaranteed to be stable over different versions of this library, meaning that a returned error can change from one version to the next. There are simply too many fringe cases that are not easy to classify as a specific error kind. It depends entirely on the specific parser code how an invalid input is categorized.
Consider these examples:
'\
can be seen as- invalid escape in character literal, or
- unterminated character literal.
'''
can be seen as- empty character literal, or
- unescaped quote character in character literal.
0b64
can be seen as- binary integer literal with invalid digit 6, or
- binary integer literal with invalid digit 4, or
- decimal integer literal with invalid digit b, or
- decimal integer literal 0 with unknown type suffix
b64
.
If you want to see more if these examples, feel free to check out the unit tests of this library.
While this library does its best to emit sensible and precise errors, and to keep the returned errors as stable as possible, full stability cannot be guaranteed.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
Blanket Implementations
Mutably borrows from an owned value. Read more