Skip to main content

Parse

Trait Parse 

Source
pub trait Parse {
    type Token: Debug;
    type Output;

    // Required method
    fn parse<I>(input: &mut I) -> Result<Success<Self::Output, I>, Error<I>>
       where I: Input<Token = Self::Token>;
}

Required Associated Types§

Required Methods§

Source

fn parse<I>(input: &mut I) -> Result<Success<Self::Output, I>, Error<I>>
where I: Input<Token = Self::Token>,

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.

Implementations on Foreign Types§

Source§

impl<P> Parse for Option<P>
where P: Parse,

Source§

type Token = <P as Parse>::Token

Source§

type Output = Option<<P as Parse>::Output>

Source§

fn parse<I>(input: &mut I) -> Result<Success<Self::Output, I>, Error<I>>
where I: Input<Token = Self::Token>,

Source§

impl<P> Parse for Box<P>
where P: Parse,

Source§

type Token = <P as Parse>::Token

Source§

type Output = Box<<P as Parse>::Output>

Source§

fn parse<I>(input: &mut I) -> Result<Success<Self::Output, I>, Error<I>>
where I: Input<Token = Self::Token>,

Source§

impl<P> Parse for Arc<P>
where P: Parse,

Source§

type Token = <P as Parse>::Token

Source§

type Output = Arc<<P as Parse>::Output>

Source§

fn parse<I>(input: &mut I) -> Result<Success<Self::Output, I>, Error<I>>
where I: Input<Token = Self::Token>,

Source§

impl<P> Parse for Vec<P>
where P: Parse,

Source§

type Token = <P as Parse>::Token

Source§

type Output = Vec<<P as Parse>::Output>

Source§

fn parse<I>(input: &mut I) -> Result<Success<Self::Output, I>, Error<I>>
where I: Input<Token = Self::Token>,

Source§

impl<T: Debug> Parse for PhantomData<T>

Source§

type Token = T

Source§

type Output = PhantomData<T>

Source§

fn parse<I>(_input: &mut I) -> Result<Success<Self::Output, I>, Error<I>>
where I: Input<Token = Self::Token>,

Implementors§

Source§

impl<O, T> Parse for Pratt<O, T>
where O: Precedence, T: Parse<Token = O::Token>,

Source§

type Output = Pratt<O, T>

Source§

type Token = <T as Parse>::Token

Source§

impl<P, D> Parse for Delimited<P, D>
where P: Parse<Output = P>, D: Parse<Output = D, Token = P::Token>,

Source§

type Token = <P as Parse>::Token

Source§

type Output = Delimited<P, D>