oni_comb_parser_rs::prelude

Trait LoggingParsers

Source
pub trait LoggingParsers: Parsers {
    // Required methods
    fn log_map<'a, I, A, B, F>(
        parser: Self::P<'a, I, A>,
        name: &'a str,
        log_level: LogLevel,
        f: F,
    ) -> Self::P<'a, I, A>
       where F: Fn(&ParseResult<'a, I, A>) -> B + 'a,
             I: Debug,
             A: Debug + 'a,
             B: Display + 'a;
    fn name<'a, I, A>(
        parser: Self::P<'a, I, A>,
        name: &'a str,
    ) -> Self::P<'a, I, A>
       where I: Debug,
             A: Debug + 'a;
    fn expect<'a, I, A>(
        parser: Self::P<'a, I, A>,
        name: &'a str,
    ) -> Self::P<'a, I, A>
       where I: Debug,
             A: Debug + 'a;

    // Provided method
    fn log<'a, I, A>(
        parser: Self::P<'a, I, A>,
        name: &'a str,
        log_level: LogLevel,
    ) -> Self::P<'a, I, A>
       where I: Debug,
             A: Debug + 'a { ... }
}

Required Methods§

Source

fn log_map<'a, I, A, B, F>( parser: Self::P<'a, I, A>, name: &'a str, log_level: LogLevel, f: F, ) -> Self::P<'a, I, A>
where F: Fn(&ParseResult<'a, I, A>) -> B + 'a, I: Debug, A: Debug + 'a, B: Display + 'a,

Source

fn name<'a, I, A>(parser: Self::P<'a, I, A>, name: &'a str) -> Self::P<'a, I, A>
where I: Debug, A: Debug + 'a,

Source

fn expect<'a, I, A>( parser: Self::P<'a, I, A>, name: &'a str, ) -> Self::P<'a, I, A>
where I: Debug, A: Debug + 'a,

Provided Methods§

Source

fn log<'a, I, A>( parser: Self::P<'a, I, A>, name: &'a str, log_level: LogLevel, ) -> Self::P<'a, I, A>
where I: Debug, A: Debug + 'a,

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§