[][src]Trait hinku::ParseResultExt

pub trait ParseResultExt<T, E>: Sized {
    fn expected<C>(self, context: C) -> ParseResult<T, E>
    where
        E: From<C>
;
fn optional(self) -> Option<T>; }

Implements convinience methods related to error handling for ParseResult.

Required methods

fn expected<C>(self, context: C) -> ParseResult<T, E> where
    E: From<C>, 

Appends error context to the error if the ParseResult represents an error.

fn optional(self) -> Option<T>

Transmutes the type into an Option, dismissing any possible errors.

Loading content...

Implementors

impl<T, E> ParseResultExt<T, E> for ParseResult<T, E>[src]

Loading content...