Skip to main content

Parser

Trait Parser 

Source
pub trait Parser {
    type Item;
    type Next;
    type Error;

    // Required method
    fn next<R: Read>(
        self,
        reader: &mut R,
    ) -> ParseResult<Self::Item, Self::Next, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<A, B, C, D, E, F, G, H> Parser for ((), A, B, C, D, E, F, G, H)

Source§

impl<A: Parser, B: Parser<Error = A::Error>, C: Parser<Error = A::Error>, D: Parser<Error = A::Error>, E: Parser<Error = A::Error>, F: Parser<Error = A::Error>, G: Parser<Error = A::Error>, H: Parser<Error = A::Error>> Parser for (A, B, C, D, E, F, G, H)

Source§

type Item = <A as Parser>::Item

Source§

type Next = (<A as Parser>::Next, B, C, D, E, F, G, H)

Source§

type Error = <A as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<B, C, D, E, F, G, H> Parser for ((), B, C, D, E, F, G, H)

Source§

impl<B: Parser, C: Parser<Error = B::Error>, D: Parser<Error = B::Error>, E: Parser<Error = B::Error>, F: Parser<Error = B::Error>, G: Parser<Error = B::Error>, H: Parser<Error = B::Error>> Parser for (B, C, D, E, F, G, H)

Source§

type Item = <B as Parser>::Item

Source§

type Next = (<B as Parser>::Next, C, D, E, F, G, H)

Source§

type Error = <B as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<C, D, E, F, G, H> Parser for ((), C, D, E, F, G, H)

Source§

impl<C: Parser, D: Parser<Error = C::Error>, E: Parser<Error = C::Error>, F: Parser<Error = C::Error>, G: Parser<Error = C::Error>, H: Parser<Error = C::Error>> Parser for (C, D, E, F, G, H)

Source§

type Item = <C as Parser>::Item

Source§

type Next = (<C as Parser>::Next, D, E, F, G, H)

Source§

type Error = <C as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<D, E, F, G, H> Parser for ((), D, E, F, G, H)

Source§

impl<D: Parser, E: Parser<Error = D::Error>, F: Parser<Error = D::Error>, G: Parser<Error = D::Error>, H: Parser<Error = D::Error>> Parser for (D, E, F, G, H)

Source§

type Item = <D as Parser>::Item

Source§

type Next = (<D as Parser>::Next, E, F, G, H)

Source§

type Error = <D as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<E, F, G, H> Parser for ((), E, F, G, H)

Source§

type Item = <(E, F, G, H) as Parser>::Item

Source§

type Next = <(E, F, G, H) as Parser>::Next

Source§

type Error = <(E, F, G, H) as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<E: Parser, F: Parser<Error = E::Error>, G: Parser<Error = E::Error>, H: Parser<Error = E::Error>> Parser for (E, F, G, H)

Source§

type Item = <E as Parser>::Item

Source§

type Next = (<E as Parser>::Next, F, G, H)

Source§

type Error = <E as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<F, G, H> Parser for ((), F, G, H)

Source§

type Item = <(F, G, H) as Parser>::Item

Source§

type Next = <(F, G, H) as Parser>::Next

Source§

type Error = <(F, G, H) as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<F: Parser, G: Parser<Error = F::Error>, H: Parser<Error = F::Error>> Parser for (F, G, H)

Source§

type Item = <F as Parser>::Item

Source§

type Next = (<F as Parser>::Next, G, H)

Source§

type Error = <F as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<G, H> Parser for ((), G, H)
where (G, H): Parser,

Source§

type Item = <(G, H) as Parser>::Item

Source§

type Next = <(G, H) as Parser>::Next

Source§

type Error = <(G, H) as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<G: Parser, H: Parser<Error = G::Error>> Parser for (G, H)

Source§

type Item = <G as Parser>::Item

Source§

type Next = (<G as Parser>::Next, H)

Source§

type Error = <G as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<H: Parser> Parser for (H,)

Source§

type Item = <H as Parser>::Item

Source§

type Next = (<H as Parser>::Next,)

Source§

type Error = <H as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Source§

impl<H> Parser for ((), H)
where H: Parser,

Source§

type Item = <H as Parser>::Item

Source§

type Next = <H as Parser>::Next

Source§

type Error = <H as Parser>::Error

Source§

fn next<R: Read>( self, reader: &mut R, ) -> ParseResult<Self::Item, Self::Next, Self::Error>

Implementors§

Source§

impl<T, E> Parser for JustResult<T, E>