5 releases

0.2.1 Sep 19, 2022
0.2.0 Jan 20, 2019
0.1.2 Feb 18, 2018
0.1.1 Nov 15, 2017
0.1.0 Nov 15, 2017

#661 in Data structures

Download history 1333/week @ 2024-07-20 1128/week @ 2024-07-27 1875/week @ 2024-08-03 1101/week @ 2024-08-10 1657/week @ 2024-08-17 1203/week @ 2024-08-24 1639/week @ 2024-08-31 1635/week @ 2024-09-07 1793/week @ 2024-09-14 1777/week @ 2024-09-21 1108/week @ 2024-09-28 1253/week @ 2024-10-05 1250/week @ 2024-10-12 845/week @ 2024-10-19 986/week @ 2024-10-26 916/week @ 2024-11-02

4,167 downloads per month
Used in 31 crates (5 directly)

MIT/Apache

26KB
586 lines

iowrap

CI

A couple of utilities that I have ended up wanting in various projects, around std::io::Read streams.

  • Eof has an eof()? -> bool to check if the stream is at the end.
  • Pos has an position() -> u64 to find out where you are in a stream.
  • ReadMany adds a read_many to Read, like read_exact but with defined EoF behaviour
  • Ignore implements Read and Write and Seek and.. and does nothing.
  • ShortRead is an intentionally, controllably naughty Read for testing.

Documentation

Please read the iowrap documentation on docs.rs.

License

MIT or Apache 2.0.


lib.rs:

Some utility methods for wrapping std::io::Read and std::io::Write.

Dependencies

~250KB