Expand description

Random-access I/O

This crate defines ReadAt, WriteAt, and EditAt traits which define interfaces to random-access or seekable devices, such as normal files, block devices, disk partitions, and memory buffers.

It also defines ArrayReader, ArrayWriter, and ArrayEditor types which implement the above traits and and can be constructed from any file-like type. On Posix-ish platforms, including limited support for WASI, these types just contain a single file descriptor (and implement AsRawFd), plus any resources needed to safely hold the file descriptor live. On Windows, they contain a single file handle (and implement AsRawHandle).

Modules

Functions for custom implementations of ReadAt and WriteAt for file-like types.

Structs

A random-access input source and output sink.

A random-access input source.

A random-access output sink.

Metadata information about an array.

Enums

Advice to pass to Array::advise to describe an expected access pattern.

Traits

A minimal base trait for array I/O. Defines operations common to all kinds of random-access devices that fit the “array” concept, including normal files, block devices, and in-memory buffers.

A trait for reading and writing to arrays.

A trait for reading from arrays.

A trait for writing to arrays.