Trait rdcl_aoc_helpers::input::WithReadLines
source · pub trait WithReadLines<R: Read> {
fn read_lines<T: FromStr>(self, exit_code_on_fail: i32) -> MappedLines<T, R>ⓘNotable traits for MappedLines<T, R>impl<T: FromStr, R: Read> Iterator for MappedLines<T, R>where
<T as FromStr>::Err: Debug, type Item = T;
;
}
Expand description
This trait allows you to easily read lines from a Readable object.
Required Methods
sourcefn read_lines<T: FromStr>(self, exit_code_on_fail: i32) -> MappedLines<T, R>ⓘNotable traits for MappedLines<T, R>impl<T: FromStr, R: Read> Iterator for MappedLines<T, R>where
<T as FromStr>::Err: Debug, type Item = T;
fn read_lines<T: FromStr>(self, exit_code_on_fail: i32) -> MappedLines<T, R>ⓘNotable traits for MappedLines<T, R>impl<T: FromStr, R: Read> Iterator for MappedLines<T, R>where
<T as FromStr>::Err: Debug, type Item = T;
<T as FromStr>::Err: Debug, type Item = T;
Read lines from a given Readable object, and parse each line to the requested type.
Implementations on Foreign Types
sourceimpl WithReadLines<File> for File
impl WithReadLines<File> for File
fn read_lines<T: FromStr>(self, exit_code_on_fail: i32) -> MappedLines<T, File>ⓘNotable traits for MappedLines<T, R>impl<T: FromStr, R: Read> Iterator for MappedLines<T, R>where
<T as FromStr>::Err: Debug, type Item = T;
<T as FromStr>::Err: Debug, type Item = T;
sourceimpl WithReadLines<File> for Result<File>
impl WithReadLines<File> for Result<File>
fn read_lines<T: FromStr>(self, exit_code_on_fail: i32) -> MappedLines<T, File>ⓘNotable traits for MappedLines<T, R>impl<T: FromStr, R: Read> Iterator for MappedLines<T, R>where
<T as FromStr>::Err: Debug, type Item = T;
<T as FromStr>::Err: Debug, type Item = T;