Struct melib::email::parser::ParsingError
source · pub struct ParsingError<I> {
pub input: I,
pub error: Cow<'static, str>,
}
Fields§
§input: I
§error: Cow<'static, str>
Implementations§
source§impl<'i> ParsingError<&'i str>
impl<'i> ParsingError<&'i str>
pub fn as_bytes(self) -> ParsingError<&'i [u8]>
Trait Implementations§
source§impl<I> ContextError<I> for ParsingError<I>
impl<I> ContextError<I> for ParsingError<I>
source§fn add_context(_input: I, _ctx: &'static str, other: Self) -> Self
fn add_context(_input: I, _ctx: &'static str, other: Self) -> Self
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 Debug for ParsingError<&[u8]>
impl Debug for ParsingError<&[u8]>
source§impl Debug for ParsingError<&str>
impl Debug for ParsingError<&str>
source§impl<I> From<(I, &'static str)> for ParsingError<I>
impl<I> From<(I, &'static str)> for ParsingError<I>
source§impl<I> From<(I, String)> for ParsingError<I>
impl<I> From<(I, String)> for ParsingError<I>
source§impl<'i> From<ParsingError<&'i [u8]>> for Error
impl<'i> From<ParsingError<&'i [u8]>> for Error
source§fn from(val: ParsingError<&'i [u8]>) -> Self
fn from(val: ParsingError<&'i [u8]>) -> Self
Converts to this type from the input type.
source§impl<'i> From<ParsingError<&'i [u8]>> for Error<&'i [u8]>
impl<'i> From<ParsingError<&'i [u8]>> for Error<&'i [u8]>
source§fn from(val: ParsingError<&'i [u8]>) -> Self
fn from(val: ParsingError<&'i [u8]>) -> Self
Converts to this type from the input type.
source§impl<'i> From<ParsingError<&'i str>> for Error
impl<'i> From<ParsingError<&'i str>> for Error
source§fn from(val: ParsingError<&'i str>) -> Self
fn from(val: ParsingError<&'i str>) -> Self
Converts to this type from the input type.
source§impl<I, E> FromExternalError<I, E> for ParsingError<I>
impl<I, E> FromExternalError<I, E> for ParsingError<I>
source§fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self
fn from_external_error(input: I, kind: ErrorKind, _e: E) -> 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 ParsingError<I>
impl<I> ParseError<I> for ParsingError<I>
source§fn from_error_kind(input: I, kind: ErrorKind) -> Self
fn from_error_kind(input: I, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
source§fn append(input: I, kind: ErrorKind, other: Self) -> Self
fn append(input: I, kind: 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
source§impl<I: PartialEq> PartialEq<ParsingError<I>> for ParsingError<I>
impl<I: PartialEq> PartialEq<ParsingError<I>> for ParsingError<I>
source§fn eq(&self, other: &ParsingError<I>) -> bool
fn eq(&self, other: &ParsingError<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<I: Eq> Eq for ParsingError<I>
impl<I> StructuralEq for ParsingError<I>
impl<I> StructuralPartialEq for ParsingError<I>
Auto Trait Implementations§
impl<I> RefUnwindSafe for ParsingError<I>where I: RefUnwindSafe,
impl<I> Send for ParsingError<I>where I: Send,
impl<I> Sync for ParsingError<I>where I: Sync,
impl<I> Unpin for ParsingError<I>where I: Unpin,
impl<I> UnwindSafe for ParsingError<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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.