Enum mdmatter::IResult [] [src]

pub enum IResult<I, O, E = u32> {
    Done(I, O),
    Error(Err<I, E>),
    Incomplete(Needed),
}

Holds the result of parsing functions

It depends on I, the input type, O, the output type, and E, the error type (by default u32)

Variants

indicates a correct parsing, the first field containing the rest of the unparsed data, the second field contains the parsed data

contains a Err, an enum that can indicate an error code, a position in the input, and a pointer to another error, making a list of errors in the parsing tree

Incomplete contains a Needed, an enum than can represent a known quantity of input data, or unknown

Methods

impl<I, O, E> IResult<I, O, E>
[src]

Maps a IResult<I, O, E> to IResult<I, N, E> by appling a function to a contained Done value, leaving Error and Incomplete value untouched.

Maps a IResult<I, O, E> to IResult<I, O, E> by appling a function to a contained Incomplete value, leaving Done and Error value untouched.

Maps a IResult<I, O, E> to IResult<I, O, N> by appling a function to a contained Error value, leaving Done and Incomplete value untouched.

Unwrap the contained Done(I, O) value, or panic if the IResult is not Done.

Unwrap the contained Done(I, O) value, or panic if the IResult is not Done.

Unwrap the contained Done(I, O) value, or panic if the IResult is not Done.

Trait Implementations

impl<'a, O, E> GetInput<&'a str> for IResult<&'a str, O, E>
[src]

impl<'a, I, O, E> GetInput<&'a [I]> for IResult<&'a [I], O, E>
[src]

impl<O, E> GetInput<()> for IResult<(), O, E>
[src]

impl<'a, I, E> GetOutput<&'a str> for IResult<I, &'a str, E>
[src]

impl<'a, I, O, E> GetOutput<&'a [O]> for IResult<I, &'a [O], E>
[src]

impl<I, E> GetOutput<()> for IResult<I, (), E>
[src]

impl<I, O, E> Eq for IResult<I, O, E> where
    E: Eq,
    I: Eq,
    O: Eq
[src]

impl<I, O, E> PartialEq<IResult<I, O, E>> for IResult<I, O, E> where
    E: PartialEq<E>,
    I: PartialEq<I>,
    O: PartialEq<O>, 
[src]

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

This method tests for !=.

impl<I, O, E> Debug for IResult<I, O, E> where
    E: Debug,
    I: Debug,
    O: Debug
[src]

Formats the value using the given formatter.

impl<I, O, E> Clone for IResult<I, O, E> where
    E: Clone,
    I: Clone,
    O: Clone
[src]