pub enum ParseError<I> {
Show 18 variants
Base(I),
Expected {
tried: I,
expected: &'static str,
},
Explained {
tried: I,
explained: &'static str,
},
ExplainedExpected {
tried: I,
explained: &'static str,
expected: &'static str,
},
MissingDelimiter {
opened: I,
tried: I,
},
ExcessiveDepth(I),
Field(I, String),
Split(I, String),
Order(I, String),
Group(I, String),
Role(I, String),
ParseInt {
tried: I,
error: ParseIntError,
},
ParseFloat {
tried: I,
error: ParseFloatError,
},
ParseDecimal {
tried: I,
error: Error,
},
ParseRegex {
tried: I,
error: Error,
},
RangeError {
tried: I,
lower: Bound<u32>,
upper: Bound<u32>,
},
InvalidUnicode {
tried: I,
},
InvalidPath {
tried: I,
parent: I,
},
}
Variants§
Base(I)
Expected
Explained
ExplainedExpected
MissingDelimiter
ExcessiveDepth(I)
Field(I, String)
Split(I, String)
Order(I, String)
Group(I, String)
Role(I, String)
ParseInt
ParseFloat
ParseDecimal
ParseRegex
RangeError
InvalidUnicode
Fields
§
tried: I
InvalidPath
Implementations§
Source§impl<I: Clone> ParseError<I>
impl<I: Clone> ParseError<I>
Source§impl ParseError<&str>
impl ParseError<&str>
Sourcepub fn render_on(&self, input: &str) -> RenderedError
pub fn render_on(&self, input: &str) -> RenderedError
Returns the error represented as a pretty printed string formatted on the original source text.
Trait Implementations§
Source§impl<I: Clone> Clone for ParseError<I>
impl<I: Clone> Clone for ParseError<I>
Source§fn clone(&self) -> ParseError<I>
fn clone(&self) -> ParseError<I>
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<I: Debug> Debug for ParseError<I>
impl<I: Debug> Debug for ParseError<I>
Source§impl<I> Error for ParseError<I>
impl<I> Error for ParseError<I>
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<I> FromExternalError<I, Error> for ParseError<I>
impl<I> FromExternalError<I, Error> for ParseError<I>
Source§impl<I> FromExternalError<I, ParseFloatError> for ParseError<I>
impl<I> FromExternalError<I, ParseFloatError> for ParseError<I>
Source§fn from_external_error(input: I, _kind: ErrorKind, e: ParseFloatError) -> Self
fn from_external_error(input: I, _kind: ErrorKind, e: ParseFloatError) -> Self
Creates a new error from an input position, an ErrorKind indicating the
wrapping parser, and an external error
Source§impl<I> FromExternalError<I, ParseIntError> for ParseError<I>
impl<I> FromExternalError<I, ParseIntError> for ParseError<I>
Source§fn from_external_error(input: I, _kind: ErrorKind, e: ParseIntError) -> Self
fn from_external_error(input: I, _kind: ErrorKind, e: ParseIntError) -> Self
Creates a new error from an input position, an ErrorKind indicating the
wrapping parser, and an external error
Source§impl<I> ParseError<I> for ParseError<I>
impl<I> ParseError<I> for ParseError<I>
Source§fn from_error_kind(input: I, _: ErrorKind) -> Self
fn from_error_kind(input: I, _: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
Source§fn append(_: I, _: ErrorKind, other: Self) -> Self
fn append(_: I, _: ErrorKind, other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way
Auto Trait Implementations§
impl<I> Freeze for ParseError<I>where
I: Freeze,
impl<I> RefUnwindSafe for ParseError<I>where
I: RefUnwindSafe,
impl<I> Send for ParseError<I>where
I: Send,
impl<I> Sync for ParseError<I>where
I: Sync,
impl<I> Unpin for ParseError<I>where
I: Unpin,
impl<I> UnwindSafe for ParseError<I>where
I: 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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