pub enum ParserError<C: 'static> {
UnexpectedEndOfFile,
UnexpectedToken(Vec<C>, Vec<C>),
InvalidLiteral(Vec<C>),
ParseIntError(ParseIntError),
}
Expand description
Error type issued from lexer and parser.
Variants§
UnexpectedEndOfFile
Reached end of file before end of library arrived.
UnexpectedToken(Vec<C>, Vec<C>)
Expected and actual token.
InvalidLiteral(Vec<C>)
Unknown literal. The literal is given as a string.
ParseIntError(ParseIntError)
Failed to parse an integer.
Trait Implementations§
Source§impl<C: Clone + 'static> Clone for ParserError<C>
impl<C: Clone + 'static> Clone for ParserError<C>
Source§fn clone(&self) -> ParserError<C>
fn clone(&self) -> ParserError<C>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C: Debug + 'static> Debug for ParserError<C>
impl<C: Debug + 'static> Debug for ParserError<C>
Source§impl<C: 'static + Display + Debug> Error for ParserError<C>
impl<C: 'static + Display + Debug> Error for ParserError<C>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<C> From<ParseIntError> for ParserError<C>
impl<C> From<ParseIntError> for ParserError<C>
Source§fn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> Freeze for ParserError<C>
impl<C> RefUnwindSafe for ParserError<C>where
C: RefUnwindSafe,
impl<C> Send for ParserError<C>where
C: Send,
impl<C> Sync for ParserError<C>where
C: Sync,
impl<C> Unpin for ParserError<C>where
C: Unpin,
impl<C> UnwindSafe for ParserError<C>where
C: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more