Enum nom::Err [] [src]

pub enum Err<P, E = u32> {
    Code(ErrorKind<E>),
    Node(ErrorKind<E>, Box<Err<P, E>>),
    Position(ErrorKind<E>, P),
    NodePosition(ErrorKind<E>, P, Box<Err<P, E>>),
}

Contains the error that a parser can return

It can represent a linked list of errors, indicating the path taken in the parsing tree, with corresponding position in the input data. It depends on P, the input position (for a &[u8] parser, it would be a &[u8]), and E, the custom error type (by default, u32)

Variants

Code

An error code, represented by an ErrorKind, which can contain a custom error code represented by E

Node

An error code, and the next error

Position

An error code, and the input position

NodePosition

An error code, the input position and the next error

Trait Implementations

impl<P: Debug + Any, E: Debug + Any> Error for Err<P, E>

fn description(&self) -> &str

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

impl<P: Debug, E: Debug> Display for Err<P, E>

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

Derived Implementations

impl<P: Clone, E: Clone> Clone for Err<P, E>

fn clone(&self) -> Err<P, E>

1.0.0fn clone_from(&mut self, source: &Self)

impl<P: Eq, E: Eq> Eq for Err<P, E>

impl<P: PartialEq, E: PartialEq> PartialEq for Err<P, E>

fn eq(&self, __arg_0: &Err<P, E>) -> bool

fn ne(&self, __arg_0: &Err<P, E>) -> bool

impl<P: Debug, E: Debug> Debug for Err<P, E>

fn fmt(&self, __arg_0: &mut Formatter) -> Result