Crate io_ranges[][src]

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 RangeReader, RangeWriter, and RangeEditor 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

filelike

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

Structs

Metadata

Metadata information about a range.

RangeEditor

A random-access input and output source.

RangeReader

A random-access input source.

RangeWriter

A random-access output source.

Enums

Advice

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

Traits

EditAt

A trait for reading and writing to ranges.

Range

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

ReadAt

A trait for reading from ranges.

WriteAt

A trait for writing to ranges.