pub trait RepetitionArgument: Clone {
// Required methods
fn at_least(&self) -> usize;
fn at_most(&self) -> Option<usize>;
}
Expand description
Trait used to specify how many times a parser should run.
The following types implement this trait:
usize
(e.g.8
): Run the parser 8 times.RangeFrom
(e.g.4..
) Run the parser at least 4 times (maybe more).RangeInclusive
(e.g.3..=7
) Run the parser at least 3 times, but no more than 7 times.RangeToInclusive
(e.g...=4
) Run the parser at most 4 times (maybe less, even 0).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.