std_io_iterators 1.1.0

An iterator for `STDIN` and a wrapper for `STDOUT`. Allows easy piping, and graceful closing of application if pipe breaks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std_io_iterators::prelude::*;

fn main() -> Result<(), std::io::Error> {
    let mut pipe_in = PipeInIterator::try_new()
        .expect("1669234431 - Unable to establish pipe");

    // Accept 2 lines then exit gracefully
    println!("{}", pipe_in.next().unwrap());
    println!("{}", pipe_in.next().unwrap());

    Ok(())
}