pub enum NcclError {
UnexpectedToken {
span: Span,
expected: TokenKind,
got: TokenKind,
},
UnterminatedString {
start: usize,
},
TrailingCharacters {
line: usize,
},
ScanUnknownEscape {
line: usize,
column: usize,
escape: char,
},
ParseUnknownEscape {
escape: char,
},
Utf8 {
err: Utf8Error,
},
}
Expand description
Errors that may occur while parsing
Variants§
UnexpectedToken
Fields
An unexpected token was encountered.
UnterminatedString
The string was not terminated before the end of the file.
TrailingCharacters
There were non-comment characters after a quoted string.
ScanUnknownEscape
Fields
The escape code in the file was unknown.
ParseUnknownEscape
The escape literal in the key was unknown. See crate::config::Config::parse_quoted
.
Utf8
A utf-8 string could not be constructed.
Trait Implementations§
source§impl From<FromUtf8Error> for NcclError
impl From<FromUtf8Error> for NcclError
source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
source§impl PartialEq for NcclError
impl PartialEq for NcclError
impl StructuralPartialEq for NcclError
Auto Trait Implementations§
impl Freeze for NcclError
impl RefUnwindSafe for NcclError
impl Send for NcclError
impl Sync for NcclError
impl Unpin for NcclError
impl UnwindSafe for NcclError
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