Skip to main content

Acceptor

Trait 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>

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<'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§