Lines Matching defs:count
16 /// Pre-allocating memory is a nice optimization but count fields can't
18 /// amount. This reduces the risk of a bogus count value triggering a panic
398 for count in 0..max {
411 if count < min {
460 let mut count = 0;
473 count += 1;
476 Err(Err::Error(_)) => return Ok((input, count)),
522 let mut count = 1;
529 Err(Err::Error(_)) => return Ok((input, count)),
537 count += 1;
547 /// Runs the embedded parser `count` times, gathering the results in a `Vec`
551 /// * `count` How often to apply the parser.
554 /// use nom::multi::count;
558 /// count(tag("abc"), 2)(s)
569 pub fn count<I, O, E, F>(mut f: F, count: usize) -> impl FnMut(I) -> IResult<I, Vec<O>, E>
579 let mut res = crate::lib::std::vec::Vec::with_capacity(count.min(max_initial_capacity));
581 for _ in 0..count {
874 for count in 0..max {
888 if count < min {
998 /// * `f` The parser to apply to obtain the count.
1027 let (i, count) = f.parse(i)?;
1031 for _ in 0..count.to_usize() {