Trait rusty_peg::Symbol [] [src]

pub trait Symbol<'input, G> {
    type Output;
    fn pretty_print(&self) -> String;
    fn parse(&self, grammar: &mut G, input: Input<'input>) -> ParseResult<'input, Self::Output>;

    fn parse_complete(&self, grammar: &mut G, text: &'input str) -> Result<Self::Output, Error<'input>> { ... }
    fn parse_prefix(&self, grammar: &mut G, text: &'input str) -> ParseResult<'input, Self::Output> { ... }
}

Associated Types

type Output

Required Methods

fn pretty_print(&self) -> String

fn parse(&self, grammar: &mut G, input: Input<'input>) -> ParseResult<'input, Self::Output>

Provided Methods

fn parse_complete(&self, grammar: &mut G, text: &'input str) -> Result<Self::Output, Error<'input>>

fn parse_prefix(&self, grammar: &mut G, text: &'input str) -> ParseResult<'input, Self::Output>

Implementors