pub enum ScanErrorKind {
LiteralMismatch,
Syntax(&'static str),
SyntaxNoMessage,
ExpectedEnd,
Float(ParseFloatError),
Int(ParseIntError),
Io(Error),
Other(Box<dyn Error>),
// some variants omitted
}
Expand description
Indicates the kind of error that occurred during scanning.
Variants§
LiteralMismatch
Failed to match a literal pattern term.
Syntax(&'static str)
General syntax error.
SyntaxNoMessage
General syntax error.
Due to Rust issue #26448, some scanners which want to return a Syntax
error cannot.
ExpectedEnd
Expected end-of-input.
Float(ParseFloatError)
Floating point parsing failed.
Int(ParseIntError)
Integer parsing failed.
Io(Error)
An IO error occurred.
Other(Box<dyn Error>)
Some other error occurred.
Implementations§
Source§impl ScanErrorKind
impl ScanErrorKind
Sourcepub fn from_other<E: Into<Box<dyn Error>>>(err: E) -> Self
pub fn from_other<E: Into<Box<dyn Error>>>(err: E) -> Self
Construct an Other
error from some generic error value.
Trait Implementations§
Source§impl Debug for ScanErrorKind
impl Debug for ScanErrorKind
Source§impl Display for ScanErrorKind
impl Display for ScanErrorKind
Source§impl Error for ScanErrorKind
impl Error for ScanErrorKind
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ScanErrorKind
impl !RefUnwindSafe for ScanErrorKind
impl !Send for ScanErrorKind
impl !Sync for ScanErrorKind
impl Unpin for ScanErrorKind
impl !UnwindSafe for ScanErrorKind
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