pub trait RepeatParsers: Parsers {
// Required method
fn repeat_sep<'a, I, A, B, R>(
parser: Self::P<'a, I, A>,
range: R,
separator: Option<Self::P<'a, I, B>>,
) -> Self::P<'a, I, Vec<A>>
where R: RangeArgument<usize> + Debug + 'a,
A: Debug + 'a,
B: Debug + 'a;
// Provided methods
fn repeat<'a, I, A, R>(
parser: Self::P<'a, I, A>,
range: R,
) -> Self::P<'a, I, Vec<A>>
where R: RangeArgument<usize> + Debug + 'a,
A: Debug + 'a { ... }
fn many0<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, Vec<A>>
where A: Debug + 'a { ... }
fn many1<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, Vec<A>>
where A: Debug + 'a { ... }
fn many_n_m<'a, I, A>(
parser: Self::P<'a, I, A>,
n: usize,
m: usize,
) -> Self::P<'a, I, Vec<A>>
where A: Debug + 'a { ... }
fn count<'a, I, A>(
parser: Self::P<'a, I, A>,
n: usize,
) -> Self::P<'a, I, Vec<A>>
where A: Debug + 'a { ... }
fn many0_sep<'a, I, A, B>(
parser: Self::P<'a, I, A>,
separator: Self::P<'a, I, B>,
) -> Self::P<'a, I, Vec<A>>
where A: Debug + 'a,
B: Debug + 'a { ... }
fn many1_sep<'a, I, A, B>(
parser: Self::P<'a, I, A>,
separator: Self::P<'a, I, B>,
) -> Self::P<'a, I, Vec<A>>
where A: Debug + 'a,
B: Debug + 'a { ... }
fn many_n_m_sep<'a, I, A, B>(
parser: Self::P<'a, I, A>,
n: usize,
m: usize,
separator: Self::P<'a, I, B>,
) -> Self::P<'a, I, Vec<A>>
where A: Debug + 'a,
B: Debug + 'a { ... }
fn count_sep<'a, I, A, B>(
parser: Self::P<'a, I, A>,
n: usize,
separator: Self::P<'a, I, B>,
) -> Self::P<'a, I, Vec<A>>
where A: Debug + 'a,
B: Debug + 'a { ... }
}
Required Methods§
fn repeat_sep<'a, I, A, B, R>( parser: Self::P<'a, I, A>, range: R, separator: Option<Self::P<'a, I, B>>, ) -> Self::P<'a, I, Vec<A>>
Provided Methods§
Sourcefn repeat<'a, I, A, R>(
parser: Self::P<'a, I, A>,
range: R,
) -> Self::P<'a, I, Vec<A>>
fn repeat<'a, I, A, R>( parser: Self::P<'a, I, A>, range: R, ) -> Self::P<'a, I, Vec<A>>
rep(5)
repeat p exactly 5 times
rep(0..)
repeat p zero or more times
rep(1..)
repeat p one or more times
rep(1..4)
match p at least 1 and at most 3 times
fn many0<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, Vec<A>>where
A: Debug + 'a,
fn many1<'a, I, A>(parser: Self::P<'a, I, A>) -> Self::P<'a, I, Vec<A>>where
A: Debug + 'a,
fn many_n_m<'a, I, A>(
parser: Self::P<'a, I, A>,
n: usize,
m: usize,
) -> Self::P<'a, I, Vec<A>>where
A: Debug + 'a,
fn count<'a, I, A>(
parser: Self::P<'a, I, A>,
n: usize,
) -> Self::P<'a, I, Vec<A>>where
A: Debug + 'a,
fn many0_sep<'a, I, A, B>( parser: Self::P<'a, I, A>, separator: Self::P<'a, I, B>, ) -> Self::P<'a, I, Vec<A>>
fn many1_sep<'a, I, A, B>( parser: Self::P<'a, I, A>, separator: Self::P<'a, I, B>, ) -> Self::P<'a, I, Vec<A>>
fn many_n_m_sep<'a, I, A, B>( parser: Self::P<'a, I, A>, n: usize, m: usize, separator: Self::P<'a, I, B>, ) -> Self::P<'a, I, Vec<A>>
fn count_sep<'a, I, A, B>( parser: Self::P<'a, I, A>, n: usize, separator: Self::P<'a, I, B>, ) -> Self::P<'a, I, Vec<A>>
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.