/
View dependency graph
Depends on
- dh-cargo (dh-sequence-cargo)
- cargo, debhelper-compat, libstd-rust-dev, rustc
README (full)
iter-read
This crate is a small library that provides a type that implements
std::io::Read for iterators over bytes (u8) and sequences of it, and also
Result<u8, E>, Result<Vec<u8>, E> etc.
Installation
This crate works with Cargo and can be found on
crates.io with a Cargo.toml like:
[dependencies]
iter-read = "1.0"
Requirements
Minimum supported Rust version is 1.58.0. No other dependencies.
Usage
A simple example:
use std::io::Read;
use iter_read::IterRead;
let source = vec![1, 2, 7, 42, 123];
let mut reader = IterRead::new(source.iter());
let mut buf = vec![0; 3];
reader.read_exact(&mut buf).unwrap();
assert_eq!(buf, b"\x01\x02\x07");
| dir | .github/ |
| dir | debian/ |
| dir | src/ |
| file | .cargo_vcs_info.json |
| file | .gitignore |
| file | CHANGELOG.md |
| file | Cargo.toml |
| file | Cargo.toml.orig |
| file | LICENSE-APACHE |
| file | LICENSE-MIT |
| file | README.md |
| file | rust-toolchain |