Lines Matching defs:consumed
369 /// Succeeds if all the input has been consumed by its child parser.
491 /// If the child parser was successful, return the consumed input as produced value.
524 /// if the child parser was successful, return the consumed input with the output
531 /// Returned tuple is of the format `(consumed input, produced output)`.
535 /// use nom::combinator::{consumed, value, recognize, map};
546 /// let mut consumed_parser = consumed(value(true, separated_pair(alpha1, char(','), alpha1)));
552 /// // the first output (representing the consumed input)
555 /// let mut consumed_parser = map(consumed(inner_parser), |(consumed, output)| consumed);
561 pub fn consumed<I, O, F, E>(mut parser: F) -> impl FnMut(I) -> IResult<I, (I, O), E>
572 let consumed = input.slice(..index);
573 Ok((remaining, (consumed, result)))