Trait rocket::mtls::oid::asn1_rs::nom::branch::Alt

source ·
pub trait Alt<I, O, E> {
    // Required method
    fn choice(&mut self, input: I) -> Result<(I, O), Err<E>>;
}
Available on crate feature mtls only.
Expand description

Helper trait for the alt() combinator.

This trait is implemented for tuples of up to 21 elements

Required Methods§

source

fn choice(&mut self, input: I) -> Result<(I, O), Err<E>>

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

Implementations on Foreign Types§

source§

impl<Input, Output, Error, A> Alt<Input, Output, Error> for (A,)
where Error: ParseError<Input>, A: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B> Alt<Input, Output, Error> for (A, B)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C> Alt<Input, Output, Error> for (A, B, C)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D> Alt<Input, Output, Error> for (A, B, C, D)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E> Alt<Input, Output, Error> for (A, B, C, D, E)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F> Alt<Input, Output, Error> for (A, B, C, D, E, F)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G> Alt<Input, Output, Error> for (A, B, C, D, E, F, G)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K, L> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>, L: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K, L, M> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>, L: Parser<Input, Output, Error>, M: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K, L, M, N> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>, L: Parser<Input, Output, Error>, M: Parser<Input, Output, Error>, N: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>, L: Parser<Input, Output, Error>, M: Parser<Input, Output, Error>, N: Parser<Input, Output, Error>, O: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>, L: Parser<Input, Output, Error>, M: Parser<Input, Output, Error>, N: Parser<Input, Output, Error>, O: Parser<Input, Output, Error>, P: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> Alt<Input, Output, Error> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>, L: Parser<Input, Output, Error>, M: Parser<Input, Output, Error>, N: Parser<Input, Output, Error>, O: Parser<Input, Output, Error>, P: Parser<Input, Output, Error>, Q: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

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

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

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

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> 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)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>, L: Parser<Input, Output, Error>, M: Parser<Input, Output, Error>, N: Parser<Input, Output, Error>, O: Parser<Input, Output, Error>, P: Parser<Input, Output, Error>, Q: Parser<Input, Output, Error>, R: Parser<Input, Output, Error>, S: Parser<Input, Output, Error>, T: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

source§

impl<Input, Output, Error, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U> 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)
where Input: Clone, Error: ParseError<Input>, A: Parser<Input, Output, Error>, B: Parser<Input, Output, Error>, C: Parser<Input, Output, Error>, D: Parser<Input, Output, Error>, E: Parser<Input, Output, Error>, F: Parser<Input, Output, Error>, G: Parser<Input, Output, Error>, H: Parser<Input, Output, Error>, I: Parser<Input, Output, Error>, J: Parser<Input, Output, Error>, K: Parser<Input, Output, Error>, L: Parser<Input, Output, Error>, M: Parser<Input, Output, Error>, N: Parser<Input, Output, Error>, O: Parser<Input, Output, Error>, P: Parser<Input, Output, Error>, Q: Parser<Input, Output, Error>, R: Parser<Input, Output, Error>, S: Parser<Input, Output, Error>, T: Parser<Input, Output, Error>, U: Parser<Input, Output, Error>,

source§

fn choice(&mut self, input: Input) -> Result<(Input, Output), Err<Error>>

Implementors§