pub struct ParserErrorWithContext {
pub context: Vec<Context>,
pub row: usize,
pub col: usize,
pub error: ParserError,
}Fields§
§context: Vec<Context>Vector holding the context that the parser was working in.
Intended to be useful for giving hints to a user about how to fix their input.
row: usizeThe row where the error was detected. 1 indexed. 0 if no characters on the line have been read.
col: usizeThe col where the error was detected. 1 indexed. Starts at 1.
error: ParserErrorThe error that the parser ran into.
Trait Implementations§
Source§impl Debug for ParserErrorWithContext
impl Debug for ParserErrorWithContext
Source§impl Display for ParserErrorWithContext
impl Display for ParserErrorWithContext
Source§impl Error for ParserErrorWithContext
impl Error for ParserErrorWithContext
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 PartialEq for ParserErrorWithContext
impl PartialEq for ParserErrorWithContext
impl StructuralPartialEq for ParserErrorWithContext
Auto Trait Implementations§
impl Freeze for ParserErrorWithContext
impl RefUnwindSafe for ParserErrorWithContext
impl Send for ParserErrorWithContext
impl Sync for ParserErrorWithContext
impl Unpin for ParserErrorWithContext
impl UnwindSafe for ParserErrorWithContext
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> 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