Skip to main content

ParserSpan

Trait ParserSpan 

Source
pub trait ParserSpan<'a> {
    type Output;

    // Required methods
    fn opt(self) -> Self::Output;
    fn opt_span(self) -> Self::Output;
    fn then(self, next: Self::Output) -> Self::Output;
    fn then_span(self, next: Self::Output) -> Self::Output;
    fn wrap(self, left: Self::Output, right: Self::Output) -> Self::Output;
    fn wrap_span(self, left: Self::Output, right: Self::Output) -> Self::Output;
    fn many(self, bounds: impl RangeBounds<usize> + 'a) -> Self::Output;
    fn many_span(self, bounds: impl RangeBounds<usize> + 'a) -> Self::Output;
    fn sep_by(
        self,
        sep: Self::Output,
        bounds: impl RangeBounds<usize> + 'a,
    ) -> Self::Output;
    fn sep_by_span(
        self,
        sep: Self::Output,
        bounds: impl RangeBounds<usize> + 'a,
    ) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn opt(self) -> Self::Output

Source

fn opt_span(self) -> Self::Output

Source

fn then(self, next: Self::Output) -> Self::Output

Source

fn then_span(self, next: Self::Output) -> Self::Output

Source

fn wrap(self, left: Self::Output, right: Self::Output) -> Self::Output

Source

fn wrap_span(self, left: Self::Output, right: Self::Output) -> Self::Output

Source

fn many(self, bounds: impl RangeBounds<usize> + 'a) -> Self::Output

Source

fn many_span(self, bounds: impl RangeBounds<usize> + 'a) -> Self::Output

Source

fn sep_by( self, sep: Self::Output, bounds: impl RangeBounds<usize> + 'a, ) -> Self::Output

Source

fn sep_by_span( self, sep: Self::Output, bounds: impl RangeBounds<usize> + 'a, ) -> Self::Output

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.

Implementors§

Source§

impl<'a> ParserSpan<'a> for Parser<'a, Span<'a>>

Source§

type Output = Parser<'a, Span<'a>>