oni_comb_parser_rs::prelude

Trait ParserFilter

Source
pub trait ParserFilter<'a>: ParserRunner<'a> {
    // Required method
    fn with_filter<F>(self, f: F) -> Self
       where F: Fn(&Self::Output) -> bool + 'a,
             Self::Input: 'a,
             Self::Output: 'a,
             Self: Sized;

    // Provided method
    fn with_filter_not<F>(self, f: F) -> Self
       where F: Fn(&Self::Output) -> bool + 'a,
             Self::Input: 'a,
             Self::Output: 'a,
             Self: Sized { ... }
}

Required Methods§

Source

fn with_filter<F>(self, f: F) -> Self
where F: Fn(&Self::Output) -> bool + 'a, Self::Input: 'a, Self::Output: 'a, Self: Sized,

解析結果をフィルターする[Parser]を返す。

Provided Methods§

Source

fn with_filter_not<F>(self, f: F) -> Self
where F: Fn(&Self::Output) -> bool + 'a, Self::Input: 'a, Self::Output: 'a, Self: Sized,

解析結果をフィルターする[Parser]を返す。

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, I, A> ParserFilter<'a> for Parser<'a, I, A>