I/O Arrays
Overview:
- Dynamic array of bytes
- or in the future, of arbitrary type
- Examples: disk partitions, memory buffers, device memory, files*
- Prototype: https://crates.io/crates/io-arrays
Operations:
read_at
write_at
len
- current lengthset_len
- set current length, truncating or appending zerosadvise
- optimization hintsflush
- flush buffers, report errorsmedia_type
- return astring
with the IANA Media Type (eg. "image/jpeg")pseudonym
- return a handle to an identifiercopy
-read_at
from one I/O array andwrite_at
the data to another 💨
Constructors:
anonymous
from_stream
- read all the data from an input stream and write it into an anonymous I/O array