pub type ParseErrorOwned = VerboseError<BString>;
Available on crate feature
verbose-object-parsing-errors
only.Expand description
The owned type to be used for parse errors.
Aliased Type§
pub struct ParseErrorOwned {
pub errors: Vec<(BString, VerboseErrorKind)>,
}
Fields§
§errors: Vec<(BString, VerboseErrorKind)>
List of errors accumulated by VerboseError
, containing the affected
part of input data, and some context
Trait Implementations
Source§impl<I> Clone for VerboseError<I>where
I: Clone,
impl<I> Clone for VerboseError<I>where
I: Clone,
Source§fn clone(&self) -> VerboseError<I>
fn clone(&self) -> VerboseError<I>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<I> ContextError<I> for VerboseError<I>
impl<I> ContextError<I> for VerboseError<I>
Source§fn add_context(
input: I,
ctx: &'static str,
other: VerboseError<I>,
) -> VerboseError<I>
fn add_context( input: I, ctx: &'static str, other: VerboseError<I>, ) -> VerboseError<I>
Creates a new error from an input position, a static string and an existing error.
This is used mainly in the context combinator, to add user friendly information
to errors when backtracking through a parse tree
Source§impl<I> Debug for VerboseError<I>where
I: Debug,
impl<I> Debug for VerboseError<I>where
I: Debug,
Source§impl<I> Display for VerboseError<I>where
I: Display,
impl<I> Display for VerboseError<I>where
I: Display,
Source§impl<I> Error for VerboseError<I>
impl<I> Error for VerboseError<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> ErrorConvert<VerboseError<(I, usize)>> for VerboseError<I>
impl<I> ErrorConvert<VerboseError<(I, usize)>> for VerboseError<I>
Source§fn convert(self) -> VerboseError<(I, usize)>
fn convert(self) -> VerboseError<(I, usize)>
Transform to another error type
Source§impl<I, E> FromExternalError<I, E> for VerboseError<I>
impl<I, E> FromExternalError<I, E> for VerboseError<I>
Source§fn from_external_error(input: I, kind: ErrorKind, _e: E) -> VerboseError<I>
fn from_external_error(input: I, kind: ErrorKind, _e: E) -> VerboseError<I>
Create a new error from an input position and an external error
Source§impl<I> ParseError<I> for VerboseError<I>
impl<I> ParseError<I> for VerboseError<I>
Source§fn from_error_kind(input: I, kind: ErrorKind) -> VerboseError<I>
fn from_error_kind(input: I, kind: ErrorKind) -> VerboseError<I>
Creates an error from the input position and an ErrorKind
Source§fn append(input: I, kind: ErrorKind, other: VerboseError<I>) -> VerboseError<I>
fn append(input: I, kind: ErrorKind, other: VerboseError<I>) -> VerboseError<I>
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
Source§fn from_char(input: I, c: char) -> VerboseError<I>
fn from_char(input: I, c: char) -> VerboseError<I>
Creates an error from an input position and an expected character