Available on crate feature
io_uring only.Expand description
Linux io_uring.
This API is very low-level. The main adaptations it makes from the raw
Linux io_uring API are the use of appropriately-sized bitflags, enum,
Result, OwnedFd, AsFd, RawFd, and *mut c_void in place of plain
integers.
For a higher-level API built on top of this, see the rustix-uring crate.
Safety
io_uring operates on raw pointers and raw file descriptors. Rustix does not attempt to provide a safe API for these, because the abstraction level is too low for this to be practical. Safety should be introduced in higher-level abstraction layers.
References
Re-exports
pub use crate::fs::Advice;pub use crate::fs::AtFlags;pub use crate::fs::Mode;pub use crate::fs::OFlags;pub use crate::fs::RenameFlags;pub use crate::fs::ResolveFlags;pub use crate::fs::Statx;pub use crate::fs::StatxFlags;pub use crate::io::ReadWriteFlags;pub use crate::net::RecvFlags;pub use crate::net::SendFlags;pub use crate::net::SocketFlags;
Structs
- A record of an event that occurred.
EPOLL*for use withadd.- accept flags (
sqe.ioprio) IORING_ASYNC_CANCEL_*flags for use withio_uring_sqe.IORING_CQ_*flags.IORING_CQE_F_*flags for use withio_uring_cqe.IORING_ENTER_*flags for use withio_uring_enter.IORING_FEAT_*flags for use withio_uring_params.IORING_FSYNC_*flags for use withio_uring_sqe.IORING_MSG_RING_*flags for use withio_uring_sqe.IO_URING_OP_*flags for use withio_uring_probe_op.IORING_POLL_*flags.- recv/recvmsg flags (
sqe.ioprio) IORING_RSRC_*flags for use withio_uring_rsrc_register.- send/sendmsg flags (
sqe.ioprio) IORING_SETUP_*flags for use withio_uring_params.IORING_SQ_*flags.IOSQE_*flags for use withio_uring_sqe.- recvmsg out flags
SPLICE_F_*flags for use withio_uring_sqe.- An io_uring Completion Queue Entry.
- A pointer in the io_uring API.
- An io_uring Submission Queue Entry.
Enums
IORING_OP_*constants for use withio_uring_sqe.IORING_RESTRICTION_*constants for use withio_uring_restriction.
Constants
IORING_NOTIF_USAGE_ZC_COPIED(since Linux 6.2)
Functions
io_uring_enter(fd, to_submit, min_complete, flags, arg, size)—Initiate and/or complete asynchronous I/O.io_uring_register(fd, opcode, arg, nr_args)—Register files or user buffers for asynchronous I/O.IORING_REGISTER_FILES_SKIPio_uring_setup(entries, params)—Setup a context for performing asynchronous I/O.
Type Aliases
struct timespec- The C
chartype.
Unions
- Data associated with an
Event. This can either be a 64-bit integer value or a pointer which preserves pointer provenance. - User data in the io_uring API.