[][src]Trait tap::TapNomOps

pub trait TapNomOps<I, O, E> {
    fn tap_done<R, F: FnOnce((&mut I, &mut O)) -> R>(self, f: F) -> Self;
fn tap_error<R, F: FnOnce(&mut Err<E>) -> R>(self, f: F) -> Self;
fn tap_incomplete<R, F: FnOnce(&mut Needed) -> R>(self, f: F) -> Self; }

Tap operations for nom's IResult, requires the feature nom3.

Required methods

fn tap_done<R, F: FnOnce((&mut I, &mut O)) -> R>(self, f: F) -> Self

Executes a closure if the value is IResult::Done.

The closure will receive a tuple of (unparsed input, parsed output).

fn tap_error<R, F: FnOnce(&mut Err<E>) -> R>(self, f: F) -> Self

Executes a closure if the value is IResult::Error.

fn tap_incomplete<R, F: FnOnce(&mut Needed) -> R>(self, f: F) -> Self

Executes a closure if the value is IResult::Incomplete.

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

Loading content...