Function pear::combinators::collect
source · pub fn collect<C, I, O, P>(input: &mut Pear<I>, p: P) -> Result<C, I>where
C: Collection<O>,
I: Input,
P: FnMut(&mut Pear<I>) -> Result<O, I>,Expand description
Parses as many p as possible until EOF is reached, collecting them into a
C. Fails if p every fails. C may be empty.