Trait combine::combinator::ChoiceParser
[−]
[src]
pub trait ChoiceParser { type Input: Stream; type Output; fn parse_choice(
&mut self,
input: Self::Input
) -> ConsumedResult<Self::Output, Self::Input>; fn add_error_choice(
&mut self,
error: &mut Tracked<StreamError<Self::Input>>
); }
ChoiceParser
represents a parser which may parse one of several different choices depending
on the input.
This is an internal trait used to overload the choice
function.
Associated Types
Required Methods
fn parse_choice(
&mut self,
input: Self::Input
) -> ConsumedResult<Self::Output, Self::Input>
&mut self,
input: Self::Input
) -> ConsumedResult<Self::Output, Self::Input>
fn add_error_choice(&mut self, error: &mut Tracked<StreamError<Self::Input>>)
Implementors
impl<'a, P: ?Sized> ChoiceParser for &'a mut P where
P: ChoiceParser,impl<Input, Output, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
A: Parser<Input = Input, Output = Output>,
B: Parser<Input = Input, Output = Output>,
C: Parser<Input = Input, Output = Output>,
D: Parser<Input = Input, Output = Output>,
E: Parser<Input = Input, Output = Output>,
F: Parser<Input = Input, Output = Output>,
G: Parser<Input = Input, Output = Output>,
H: Parser<Input = Input, Output = Output>,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
B: Parser<Input = Input, Output = Output>,
C: Parser<Input = Input, Output = Output>,
D: Parser<Input = Input, Output = Output>,
E: Parser<Input = Input, Output = Output>,
F: Parser<Input = Input, Output = Output>,
G: Parser<Input = Input, Output = Output>,
H: Parser<Input = Input, Output = Output>,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
C: Parser<Input = Input, Output = Output>,
D: Parser<Input = Input, Output = Output>,
E: Parser<Input = Input, Output = Output>,
F: Parser<Input = Input, Output = Output>,
G: Parser<Input = Input, Output = Output>,
H: Parser<Input = Input, Output = Output>,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
D: Parser<Input = Input, Output = Output>,
E: Parser<Input = Input, Output = Output>,
F: Parser<Input = Input, Output = Output>,
G: Parser<Input = Input, Output = Output>,
H: Parser<Input = Input, Output = Output>,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
E: Parser<Input = Input, Output = Output>,
F: Parser<Input = Input, Output = Output>,
G: Parser<Input = Input, Output = Output>,
H: Parser<Input = Input, Output = Output>,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
F: Parser<Input = Input, Output = Output>,
G: Parser<Input = Input, Output = Output>,
H: Parser<Input = Input, Output = Output>,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
G: Parser<Input = Input, Output = Output>,
H: Parser<Input = Input, Output = Output>,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
H: Parser<Input = Input, Output = Output>,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (I, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
I: Parser<Input = Input, Output = Output>,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (J, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
J: Parser<Input = Input, Output = Output>,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (K, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
K: Parser<Input = Input, Output = Output>,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (L, M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
L: Parser<Input = Input, Output = Output>,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, M, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (M, N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
M: Parser<Input = Input, Output = Output>,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, N, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (N, O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
N: Parser<Input = Input, Output = Output>,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, O, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (O, P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
O: Parser<Input = Input, Output = Output>,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, P, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (P, Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
P: Parser<Input = Input, Output = Output>,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, Q, R, S, T, U, V, X, Y, Z> ChoiceParser for (Q, R, S, T, U, V, X, Y, Z) where
Input: Stream,
Q: Parser<Input = Input, Output = Output>,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, R, S, T, U, V, X, Y, Z> ChoiceParser for (R, S, T, U, V, X, Y, Z) where
Input: Stream,
R: Parser<Input = Input, Output = Output>,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, S, T, U, V, X, Y, Z> ChoiceParser for (S, T, U, V, X, Y, Z) where
Input: Stream,
S: Parser<Input = Input, Output = Output>,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, T, U, V, X, Y, Z> ChoiceParser for (T, U, V, X, Y, Z) where
Input: Stream,
T: Parser<Input = Input, Output = Output>,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, U, V, X, Y, Z> ChoiceParser for (U, V, X, Y, Z) where
Input: Stream,
U: Parser<Input = Input, Output = Output>,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, V, X, Y, Z> ChoiceParser for (V, X, Y, Z) where
Input: Stream,
V: Parser<Input = Input, Output = Output>,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, X, Y, Z> ChoiceParser for (X, Y, Z) where
Input: Stream,
X: Parser<Input = Input, Output = Output>,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<Input, Output, Y, Z> ChoiceParser for (Y, Z) where
Input: Stream,
Y: Parser<Input = Input, Output = Output>,
Z: Parser<Input = Input, Output = Output>,impl<P> ChoiceParser for [P; 0] where
P: Parser,impl<P> ChoiceParser for [P; 1] where
P: Parser,impl<P> ChoiceParser for [P; 2] where
P: Parser,impl<P> ChoiceParser for [P; 3] where
P: Parser,impl<P> ChoiceParser for [P; 4] where
P: Parser,impl<P> ChoiceParser for [P; 5] where
P: Parser,impl<P> ChoiceParser for [P; 6] where
P: Parser,impl<P> ChoiceParser for [P; 7] where
P: Parser,impl<P> ChoiceParser for [P; 8] where
P: Parser,impl<P> ChoiceParser for [P; 9] where
P: Parser,impl<P> ChoiceParser for [P; 10] where
P: Parser,impl<P> ChoiceParser for [P; 11] where
P: Parser,impl<P> ChoiceParser for [P; 12] where
P: Parser,impl<P> ChoiceParser for [P; 13] where
P: Parser,impl<P> ChoiceParser for [P; 14] where
P: Parser,impl<P> ChoiceParser for [P; 15] where
P: Parser,impl<P> ChoiceParser for [P; 16] where
P: Parser,impl<P> ChoiceParser for [P; 17] where
P: Parser,impl<P> ChoiceParser for [P; 18] where
P: Parser,impl<P> ChoiceParser for [P; 19] where
P: Parser,impl<P> ChoiceParser for [P; 20] where
P: Parser,impl<P> ChoiceParser for [P; 21] where
P: Parser,impl<P> ChoiceParser for [P; 22] where
P: Parser,impl<P> ChoiceParser for [P; 23] where
P: Parser,impl<P> ChoiceParser for [P; 24] where
P: Parser,impl<P> ChoiceParser for [P; 25] where
P: Parser,impl<P> ChoiceParser for [P; 26] where
P: Parser,impl<P> ChoiceParser for [P; 27] where
P: Parser,impl<P> ChoiceParser for [P; 28] where
P: Parser,impl<P> ChoiceParser for [P; 29] where
P: Parser,impl<P> ChoiceParser for [P; 30] where
P: Parser,impl<P> ChoiceParser for [P; 31] where
P: Parser,impl<P> ChoiceParser for [P; 32] where
P: Parser,impl<I, O, P> ChoiceParser for [P] where
I: Stream,
P: Parser<Input = I, Output = O>,