chain-reader
A Rust library for sequentially chaining multiple [Read] instances with configurable error handling.
Features
- Dynamic Reader Chaining: Combine multiple readers (including from iterators) into a single sequential read pipeline
- Configurable Error Handling: Define custom strategies for handling I/O errors using the [
ErrorAction] enum - Automatic Advancement: Automatically progresses to the next reader on EOF
- FIFO Processing: Processes readers in first-in-first-out order
Comparison with std::io::Chain
- Supports dynamic addition of readers (not limited to two fixed readers)
- Provides flexible error handling strategies
- Handles both single readers and iterators of readers
- Automatically advances on EOF (no need for manual checking)
Usage
use ;
use ;
let mut chain = new;
chain.push;
chain.push_iter;
let mut content = Stringnew;
chain.read_to_string?;