Trait nom::branch::Alt[][src]

pub trait Alt<I, O, E> {
    fn choice(&self, input: I) -> IResult<I, O, E>;
}

helper trait for the alt() combinator

this trait is implemented for tuples of up to 21 elements

Required methods

fn choice(&self, input: I) -> IResult<I, O, E>[src]

tests each parser in the tuple and returns the result of the first one that succeeds

Loading content...

Implementations on Foreign Types

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>, N: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>, N: Fn(Input) -> IResult<Input, Output, Error>, O: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>, N: Fn(Input) -> IResult<Input, Output, Error>, O: Fn(Input) -> IResult<Input, Output, Error>, P: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>, N: Fn(Input) -> IResult<Input, Output, Error>, O: Fn(Input) -> IResult<Input, Output, Error>, P: Fn(Input) -> IResult<Input, Output, Error>, Q: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>, N: Fn(Input) -> IResult<Input, Output, Error>, O: Fn(Input) -> IResult<Input, Output, Error>, P: Fn(Input) -> IResult<Input, Output, Error>, Q: Fn(Input) -> IResult<Input, Output, Error>, R: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>, N: Fn(Input) -> IResult<Input, Output, Error>, O: Fn(Input) -> IResult<Input, Output, Error>, P: Fn(Input) -> IResult<Input, Output, Error>, Q: Fn(Input) -> IResult<Input, Output, Error>, R: Fn(Input) -> IResult<Input, Output, Error>, S: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>, N: Fn(Input) -> IResult<Input, Output, Error>, O: Fn(Input) -> IResult<Input, Output, Error>, P: Fn(Input) -> IResult<Input, Output, Error>, Q: Fn(Input) -> IResult<Input, Output, Error>, R: Fn(Input) -> IResult<Input, Output, Error>, S: Fn(Input) -> IResult<Input, Output, Error>, T: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)[src]

impl<Input: Clone, Output, Error: ParseError<Input>, A: Fn(Input) -> IResult<Input, Output, Error>, B: Fn(Input) -> IResult<Input, Output, Error>, C: Fn(Input) -> IResult<Input, Output, Error>, D: Fn(Input) -> IResult<Input, Output, Error>, E: Fn(Input) -> IResult<Input, Output, Error>, F: Fn(Input) -> IResult<Input, Output, Error>, G: Fn(Input) -> IResult<Input, Output, Error>, H: Fn(Input) -> IResult<Input, Output, Error>, I: Fn(Input) -> IResult<Input, Output, Error>, J: Fn(Input) -> IResult<Input, Output, Error>, K: Fn(Input) -> IResult<Input, Output, Error>, L: Fn(Input) -> IResult<Input, Output, Error>, M: Fn(Input) -> IResult<Input, Output, Error>, N: Fn(Input) -> IResult<Input, Output, Error>, O: Fn(Input) -> IResult<Input, Output, Error>, P: Fn(Input) -> IResult<Input, Output, Error>, Q: Fn(Input) -> IResult<Input, Output, Error>, R: Fn(Input) -> IResult<Input, Output, Error>, S: Fn(Input) -> IResult<Input, Output, Error>, T: Fn(Input) -> IResult<Input, Output, Error>, U: Fn(Input) -> IResult<Input, Output, Error>> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)[src]

Loading content...

Implementors

Loading content...