Trait expry::parser::Acceptor

source ·
pub trait Acceptor<'a> {
    // Required methods
    fn accept(self, expected: &str) -> bool;
    fn span_fn<M>(self, matcher: &mut M) -> Option<&'a str>
       where M: FnMut(char) -> bool;
    fn span<P: Spanner>(self, spanner: &mut P) -> Option<&'a str>;
}

Required Methods§

source

fn accept(self, expected: &str) -> bool

source

fn span_fn<M>(self, matcher: &mut M) -> Option<&'a str>
where M: FnMut(char) -> bool,

source

fn span<P: Spanner>(self, spanner: &mut P) -> Option<&'a str>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a> Acceptor<'a> for &mut &'a str

source§

fn accept(self, expected: &str) -> bool

source§

fn span_fn<M>(self, matcher: &mut M) -> Option<&'a str>
where M: FnMut(char) -> bool,

source§

fn span<P: Spanner>(self, spanner: &mut P) -> Option<&'a str>

Implementors§