Function combine::skip_count_min_max
[−]
[src]
pub fn skip_count_min_max<P>(
min: usize,
max: usize,
parser: P
) -> SkipCountMinMax<P> where
P: Parser,
Parses parser
from min
to max
times (including min
and max
)
skipping the output of parser
.
let mut parser = skip_count_min_max(2, 2, token(b'a')); let result = parser.parse(&b"aaab"[..]); assert_eq!(result, Ok(((), &b"ab"[..]))); let result = parser.parse(&b"ab"[..]); assert!(result.is_err());
Panics
If min
> max
.