Enum cexpr::nom::Err [] [src]

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

Contains the error that a parser can return

If you use the verbose-errors compilation feature, nom::Err will be the enum defined here, otherwise, it will amount to a ErrorKind<E=u32>.

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

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

An error code, and the next error

An error code, and the input position

An error code, the input position and the next error

Methods

impl<P, E> Err<P, E>
[src]

[src]

Convert Err into ErrorKind.

This allows application code to use ErrorKind and stay independent from the verbose-errors features activation.

Trait Implementations

impl<P, E> Error for Err<P, E> where
    E: Any + Debug,
    P: Any + Debug
[src]

[src]

impl<P, E> Clone for Err<P, E> where
    E: Clone,
    P: Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<P, E> Eq for Err<P, E> where
    E: Eq,
    P: Eq
[src]

impl<P, E> PartialEq<Err<P, E>> for Err<P, E> where
    E: PartialEq<E>,
    P: PartialEq<P>, 
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<P, E> Debug for Err<P, E> where
    E: Debug,
    P: Debug
[src]

[src]

Formats the value using the given formatter.

impl<P, E> Display for Err<P, E> where
    E: Debug,
    P: Debug
[src]

[src]