iowrap

Crates.ioiowrap
lib.rsiowrap
version0.2.1
sourcesrc
created_at2017-11-15 15:02:47.841881
updated_at2022-09-19 16:08:32.931081
descriptionSmall helpers for using io::Read/io::Write
homepage
repositoryhttps://github.com/FauxFaux/iowrap-rs
max_upload_size
id39442
size27,423
Chris West (FauxFaux)

documentation

README

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.

Commit count: 31

cargo fmt