Struct Error

struct Error<I> { ... }

default error type, only contains the error's location and code

Fields

input: I

position of the error in the input data

code: ErrorKind

nom error code

Implementations

impl<I> Error<I>

fn new(input: I, code: ErrorKind) -> Error<I>

creates a new basic error

impl<I: Copy> Error<&I>

fn copied(self: Self) -> Error<I>

Converts Error<&I> into Error<I> by copying.

impl<I: Copy> Error<&mut I>

fn copied(self: Self) -> Error<I>

Converts Error<&mut I> into Error<I> by copying.

impl<I: ToOwned + ?Sized> Error<&I>

fn cloned(self: Self) -> Error<<I as >::Owned>

Converts Error<&I> into Error<I::Owned> by cloning.

impl<I: ToOwned + ?Sized> Error<&mut I>

fn cloned(self: Self) -> Error<<I as >::Owned>

Converts Error<&mut I> into Error<I::Owned> by cloning.

impl From for Error<crate::lib::std::string::String>

fn from(value: Error<&str>) -> Self

impl From for Error<crate::lib::std::vec::Vec<u8>>

fn from(value: Error<&[u8]>) -> Self

impl<I> ContextError for Error<I>

impl<I> ErrorConvert for error::Error<(I, usize)>

fn convert(self: Self) -> error::Error<I>

impl<I> ErrorConvert for error::Error<I>

fn convert(self: Self) -> error::Error<(I, usize)>

impl<I> Freeze for Error<I>

impl<I> ParseError for Error<I>

fn from_error_kind(input: I, kind: ErrorKind) -> Self
fn append(_: I, _: ErrorKind, other: Self) -> Self

impl<I> RefUnwindSafe for Error<I>

impl<I> Send for Error<I>

impl<I> StructuralPartialEq for Error<I>

impl<I> Sync for Error<I>

impl<I> Unpin for Error<I>

impl<I> UnwindSafe for Error<I>

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

fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self

Create a new error from an input position and an external error

impl<I: $crate::clone::Clone> Clone for Error<I>

fn clone(self: &Self) -> Error<I>

impl<I: $crate::cmp::Eq> Eq for Error<I>

impl<I: $crate::cmp::PartialEq> PartialEq for Error<I>

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

impl<I: $crate::fmt::Debug> Debug for Error<I>

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

impl<I: fmt::Debug + fmt::Display> Error for Error<I>

impl<I: fmt::Display> Display for Error<I>

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

impl<T> Any for Error<I>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Error<I>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Error<I>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Error<I>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Error<I>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Error<I>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for Error<I>

fn to_string(self: &Self) -> String

impl<T, U> Into for Error<I>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Error<I>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Error<I>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>