Crate a10

Crate a10 

Source
Expand description

The A10 io_uring library.

This library is meant as a low-level library safely exposing the io_uring API. For simplicity this only has two main types and a number of helper types:

  • Ring is a wrapper around io_uring used to poll for completion events.
  • AsyncFd is a wrapper around a file descriptor that provides a safe API to schedule operations.

Some modules provide ways to create AsyncFd, e.g. OpenOptions, others are simply a place to expose the Futures supporting the scheduled operations. The modules try to follow the same structure as that of the standard library.

Additional documentation can be found in the io_uring(7) manual.

§Notes

Most I/O operations need ownership of the data, e.g. a buffer, so it can delay deallocation if needed. For example when a Future is dropped before being polled to completion. This data can be retrieved again by using the Extract trait.

§Examples

Examples can be found in the examples directory of the source code, available online on GitHub.

Re-exports§

pub use cancel::Cancel;
pub use extract::Extract;
pub use fd::AsyncFd;

Modules§

cancel
Cancelation of operations.
extract
Extraction of input arguments.
fd
Asynchronous file descriptor (fd).
fs
Filesystem manipulation operations.
io
Type definitions for I/O functionality.
mem
Memory operations.
msg
User defined messages.
net
Networking.
pipe
Unix pipes.
poll
Poll for file descriptor events.
process
Process handling.

Structs§

Config
Configuration of a Ring.
Ring
This type represents the user space side of an io_uring.
SubmissionQueue
Queue to submit asynchronous operations to.