Trait parser_compose::RepetitionArgument
source · 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§
Object Safety§
This trait is not object safe.