oni_comb_parser_rs::prelude

Trait ConversionParsers

Source
pub trait ConversionParsers: Parsers {
    // Required methods
    fn map_res<'a, I, A, B, E, F>(
        parser: Self::P<'a, I, A>,
        f: F,
    ) -> Self::P<'a, I, B>
       where F: Fn(A) -> Result<B, E> + 'a,
             E: Debug,
             A: Debug + 'a,
             B: Debug + 'a;
    fn map_opt<'a, I, A, B, E, F>(
        parser: Self::P<'a, I, A>,
        f: F,
    ) -> Self::P<'a, I, B>
       where F: Fn(A) -> Option<B> + 'a,
             A: Debug + 'a,
             B: Debug + 'a;

    // Provided methods
    fn convert_from_bytes_to_str<'a, I>(
        parser: Self::P<'a, I, &'a [u8]>,
    ) -> Self::P<'a, I, &'a str> { ... }
    fn convert_from_str_to_f64<'a, I>(
        parser: Self::P<'a, I, &'a str>,
    ) -> Self::P<'a, I, f64> { ... }
}

Required Methods§

Source

fn map_res<'a, I, A, B, E, F>( parser: Self::P<'a, I, A>, f: F, ) -> Self::P<'a, I, B>
where F: Fn(A) -> Result<B, E> + 'a, E: Debug, A: Debug + 'a, B: Debug + 'a,

Source

fn map_opt<'a, I, A, B, E, F>( parser: Self::P<'a, I, A>, f: F, ) -> Self::P<'a, I, B>
where F: Fn(A) -> Option<B> + 'a, A: Debug + 'a, B: Debug + 'a,

Provided Methods§

Source

fn convert_from_bytes_to_str<'a, I>( parser: Self::P<'a, I, &'a [u8]>, ) -> Self::P<'a, I, &'a str>

Source

fn convert_from_str_to_f64<'a, I>( parser: Self::P<'a, I, &'a str>, ) -> Self::P<'a, I, f64>

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§