1.1.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
Apache-2.0 - Apache License 2.0This 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.
This crate works with Cargo and can be found on
crates.io with a Cargo.toml like:
[dependencies]
iter-read = "1.0"Minimum supported Rust version is 1.58.0. No other dependencies.
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");