UniPipe
A simple Rust pipe abstraction that extends to iterator and stream.
Installation
Usage
use ;
To use generated methods from other files, you need to import the generated traits accordingly.
use MyPipeUniPipeIteratorExt as _;
let mut iter = vec!.into_iter.my_pipe;
Output
Output is the "final" return type of UniPipe::next(). It can be one of the following:
Output::Next- equivalent toOption::NoneOutput::One(value)- equivalent toOption::Some(value)Output::Many(values)Output::DoneOutput::DoneWithOne(value)Output::DoneWithMany(values)
Map Output
Output::map() is a method that allows you to transform the value of the Output without changing the structure of the Output.
Pipe Output
Output::pipe() is a method that allows you to pipe the Output to another UniPipe.
License
This project is licensed under the MIT License.