#input-stream #input #seek #reader #io-read

acc_reader

A wrapper for std::io::Read providing std::io::Seek

2 stable releases

Uses old Rust 2015

2.0.0 Feb 1, 2016
1.0.0 Jan 30, 2016

#19 in #input-stream

Download history 9/week @ 2024-03-11 4/week @ 2024-03-18 13/week @ 2024-03-25 26/week @ 2024-04-01 6/week @ 2024-04-15 8/week @ 2024-04-22 3/week @ 2024-04-29 5/week @ 2024-05-06 12/week @ 2024-05-13 43/week @ 2024-05-20 15/week @ 2024-05-27 17/week @ 2024-06-03 19/week @ 2024-06-10 11/week @ 2024-06-17 15/week @ 2024-06-24

63 downloads per month
Used in 2 crates

MIT/Apache

17KB
221 lines

acc_reader, a seekable wrapper for input streams

Build Status crates.io

Documentation

acc_reader provides AccReader, a struct which wraps an arbitrary instance of std::io::Read and provides an implementation of std::io::Seek for it. Naturally, this involves internal buffering, therefore AccReader also provides std::io::BufRead interface, though its read() method does not use this buffering. If/when specialization gets available in Rust, this could change.

See AccReader documentation for more information and examples.

Usage

Just add a dependency in your Cargo.toml:

[dependencies]
acc_reader = "2.0"

Changelog

Version 2.0.0

Changed "beyond the end of stream" seek error kind to UnexpectedEof. This is a breaking change.

Version 1.0.0

Initial release

License

This program is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps