Struct nix_compat::derivation::parse_error::NomError
source · pub struct NomError<I> {
pub input: I,
pub code: ErrorKind,
}
Expand description
Our own error type to pass along parser-related errors.
Fields§
§input: I
position of the error in the input data
code: ErrorKind
error code
Trait Implementations§
source§impl<I, E> FromExternalError<I, E> for NomError<I>
impl<I, E> FromExternalError<I, E> for NomError<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 NomError<I>
impl<I> ParseError<I> for NomError<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 for NomError<I>
impl<I: PartialEq> PartialEq for NomError<I>
impl<I> StructuralPartialEq for NomError<I>
Auto Trait Implementations§
impl<I> Freeze for NomError<I>where
I: Freeze,
impl<I> RefUnwindSafe for NomError<I>where
I: RefUnwindSafe,
impl<I> Send for NomError<I>where
I: Send,
impl<I> Sync for NomError<I>where
I: Sync,
impl<I> Unpin for NomError<I>where
I: Unpin,
impl<I> UnwindSafe for NomError<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