Struct Error

pub struct Error<I> { pub input: I, pub error: ErrorKind }

Parsing errors specific to C parsing.

This is a superset of (I, nom::ErrorKind) that includes the additional errors specified by ErrorKind.

Fields

input: I

The remainder of the input stream at the time of the error.

error: ErrorKind

The error that occurred.

Trait Implementations

impl<I> From<(I, ErrorKind)> for Error<I>

fn from(e: (I, ErrorKind)) -> Self

impl<I> From<(I, ErrorKind)> for Error<I>

fn from(e: (I, ErrorKind)) -> Self

impl<I> From<Error<I>> for Error<I>

fn from(e: Error<I>) -> Self

impl<I> ParseError<I> for Error<I>

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

impl<I: Debug> Debug for Error<I>

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

Auto Trait Implementations

impl<I> Freeze for Error<I> where I: Freeze,

impl<I> RefUnwindSafe for Error<I> where I: RefUnwindSafe,

impl<I> Send for Error<I> where I: Send,

impl<I> Sync for Error<I> where I: Sync,

impl<I> Unpin for Error<I> where I: Unpin,

impl<I> UnsafeUnpin for Error<I> where I: UnsafeUnpin,

impl<I> UnwindSafe for Error<I> where I: UnwindSafe,

Blanket Implementations

impl<T> Any for Error<I> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Error<I> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Error<I> where T: ?Sized,

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

impl<T> From<T> for Error<I>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for Error<I> where U: From<T>,

fn into(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<U> for Error<I> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Error<I> where U: TryFrom<T>,

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