A trait that represents an I/O stream that can be read from at the granularity of individual bytes, but which does not track the current offset into the stream.
ByteReader trait ideally should be auto-implemented for any type
that implements the
to allow easy byte-wise access to a block-based I/O stream.
However, Rust does not allow trait specialization yet, so we cannot do this;
instead, use the
ByteReaderWrapper type to accomplish this.
Reads bytes of data from this reader into the given
The number of bytes read is dictated by the length of the given
buffer: the buffer into which data will be copied.
offset: the offset in bytes from the beginning of this reader where the read operation will begin.
If successful, returns the number of bytes read into the given
Otherwise, returns an error.