Module nix::sys::aio

source ·
Available on crate feature aio only.
Expand description

POSIX Asynchronous I/O

The POSIX AIO interface is used for asynchronous I/O on files and disk-like devices. It supports read, write, fsync, readv, and writev, operations, subject to platform support. Completion notifications can optionally be delivered via signals, via the aio_suspend function, or via polling. Some platforms support other completion notifications, such as kevent.

Multiple operations may be submitted in a batch with lio_listio, though the standard does not guarantee that they will be executed atomically.

Outstanding operations may be cancelled with cancel or aio_cancel_all, though the operating system may not support this for all filesystems and devices.

Structs

An asynchronous version of fsync(2).
Asynchronously reads from a file descriptor into a buffer
Asynchronously writes from a buffer to a file descriptor

Enums

Mode for AioCb::fsync. Controls whether only data or both data and metadata are synced.

Traits

Methods common to all AIO operations

Functions

Cancels outstanding AIO requests for a given file descriptor.
Suspends the calling process until at least one of the specified operations have completed, a signal is delivered, or the timeout has passed.
Submits multiple asynchronous I/O requests with a single system call.