Trait peg::ParseElem

source ·
pub trait ParseElem: Parse {
    type Element;

    // Required method
    fn parse_elem(&self, pos: usize) -> RuleResult<Self::Element>;
}
Expand description

A parser input type supporting the [...] syntax.

Required Associated Types§

source

type Element

Type of a single atomic element of the input, for example a character or token

Required Methods§

source

fn parse_elem(&self, pos: usize) -> RuleResult<Self::Element>

Get the element at pos, or Failed if past end of input.

Implementations on Foreign Types§

source§

impl ParseElem for str

source§

impl<T> ParseElem for [T]
where T: Clone,

§

type Element = T

source§

fn parse_elem(&self, pos: usize) -> RuleResult<T>

Implementors§