[][src]Function pear::combinators::ok

pub fn ok<I, P, O>(input: &mut Pear<I>, p: P) -> Option<O> where
    I: Input,
    P: FnOnce(&mut Pear<I>) -> Result<O, I>, 

Parses p, returning Some if it succeeds and None if it fails. Discards the error message.