pub struct SimpleParseError<P>where
P: UserPosn,{
pub ch: char,
pub pos: P,
}
Expand description
A simple implementation of a type supporting LexerError
An error in parsing a token
P : UserPosn
Fields§
§ch: char
The character which could not be matched to a token
pos: P
The position of the character in the stream
Trait Implementations§
Source§impl<P> Clone for SimpleParseError<P>
impl<P> Clone for SimpleParseError<P>
Source§fn clone(&self) -> SimpleParseError<P>
fn clone(&self) -> SimpleParseError<P>
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<P> Debug for SimpleParseError<P>
impl<P> Debug for SimpleParseError<P>
Source§impl<P> Display for SimpleParseError<P>where
P: UserPosn,
impl<P> Display for SimpleParseError<P>where
P: UserPosn,
Source§impl<P> Error for SimpleParseError<P>where
P: UserPosn,
impl<P> Error for SimpleParseError<P>where
P: UserPosn,
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<P> LexerError<P> for SimpleParseError<P>where
P: UserPosn,
impl<P> LexerError<P> for SimpleParseError<P>where
P: UserPosn,
Source§fn failed_to_parse(pos: P, ch: char) -> Self
fn failed_to_parse(pos: P, ch: char) -> Self
Return an error indicating that a bad character (could not be
matched for a token) has occurred at the position indicated by
the state
Source§impl<P> PartialEq for SimpleParseError<P>
impl<P> PartialEq for SimpleParseError<P>
impl<P> Eq for SimpleParseError<P>
impl<P> StructuralPartialEq for SimpleParseError<P>where
P: UserPosn,
Auto Trait Implementations§
impl<P> Freeze for SimpleParseError<P>where
P: Freeze,
impl<P> RefUnwindSafe for SimpleParseError<P>where
P: RefUnwindSafe,
impl<P> Send for SimpleParseError<P>where
P: Send,
impl<P> Sync for SimpleParseError<P>where
P: Sync,
impl<P> Unpin for SimpleParseError<P>where
P: Unpin,
impl<P> UnwindSafe for SimpleParseError<P>where
P: 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