Type Alias ParseErrorOwned

Source
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,

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<I> ContextError<I> for VerboseError<I>

Source§

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,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<I> Display for VerboseError<I>
where I: Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<I> Error for VerboseError<I>
where I: Debug + Display,

1.30.0 · Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<I> ErrorConvert<VerboseError<(I, usize)>> for VerboseError<I>

Source§

fn convert(self) -> VerboseError<(I, usize)>

Transform to another error type
Source§

impl<I, E> FromExternalError<I, E> for VerboseError<I>

Source§

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>

Source§

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>

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>

Creates an error from an input position and an expected character
Source§

fn or(self, other: Self) -> Self

Combines two existing errors. This function is used to compare errors generated in various branches of alt.
Source§

impl<I> PartialEq for VerboseError<I>
where I: PartialEq,

Source§

fn eq(&self, other: &VerboseError<I>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<I> StructuralPartialEq for VerboseError<I>