| Crates.io | read_write_at |
| lib.rs | read_write_at |
| version | 0.1.0 |
| created_at | 2020-06-22 00:52:16.923212+00 |
| updated_at | 2020-06-22 00:52:16.923212+00 |
| description | Abstraction over a file or block device that can be read/written with offset. |
| homepage | |
| repository | https://github.com/vi/read_write_at |
| max_upload_size | |
| id | 256518 |
| size | 21,286 |
Abstraction of a file- or block derive-like object, data from/to which can be read/written at offsets.
There are alreay some analogues of those traits, including in libstd. But they are either platform-specific or tied to implementation of some algorithm.
This crate focuses on the abstraction itself, providing mostly wrappers and helper functions.
Traits are given in two varieties: with mutable &mut self and immutable &self methods.
libstd's platform-specific FileExt traits are forwarded for std::fs::File.
There is a generic wrapper for using Read+Seek or Read+Write+Seek objects
Immutable version of traits are implemented for RefCells or Mutexs over mutable versions.
You may need to use DerefWrapper it you use trait ojects although.
TODO:
bytes crate intergration?License: MIT/Apache-2.0