Skip to main content

StrToInt

Trait StrToInt 

Source
pub trait StrToInt {
    // Required method
    fn parse(&self, s: &str) -> Result<i32, Error>;

    // Provided method
    fn lines2ints<I>(
        &self,
        lines: I,
    ) -> impl Iterator<Item = Result<i32, Error>>
       where I: Iterator<Item = Result<String, Error>> { ... }
}

Required Methods§

Source

fn parse(&self, s: &str) -> Result<i32, Error>

Provided Methods§

Source

fn lines2ints<I>(&self, lines: I) -> impl Iterator<Item = Result<i32, Error>>
where I: Iterator<Item = Result<String, Error>>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> StrToInt for F
where F: Fn(&str) -> Result<i32, Error>,