0c74911f87
This PR adds two features to make it possible to transform an `Iterator<u8>` into a `Reader`. The first patch adds a method to mutable slices that allows it to be updated with an `Iterator<T>` without paying for the bounds cost. The second adds a Iterator adaptor, `IterReader`, to provide that `Reader` interface. I had two questions. First, are these named the right things? Second, should `IterReader` instead wrap an `Iterator<Result<u8, E>>`? This would allow you to `IterReader::new(rdr.bytes())`, which could be useful if you want to apply some iterator transformations on a reader while still exporting the Reader interface, but I'd expect there'd be a lot of overhead annotating each byte with an error result. |
||
---|---|---|
.. | ||
net | ||
buffered.rs | ||
comm_adapters.rs | ||
extensions.rs | ||
fs.rs | ||
mem.rs | ||
mod.rs | ||
pipe.rs | ||
process.rs | ||
result.rs | ||
signal.rs | ||
stdio.rs | ||
tempfile.rs | ||
test.rs | ||
timer.rs | ||
util.rs |