tokio_uring/buf/fixed/mod.rs
1//! Buffers pre-registered with the kernel.
2//!
3//! This module provides facilities for registering in-memory buffers with
4//! the `tokio-uring` runtime. Operations like [`File::read_fixed_at`][rfa] and
5//! [`File::write_fixed_at`][wfa] make use of buffers pre-mapped by
6//! the kernel to reduce per-I/O overhead.
7//!
8//! Two kinds of buffer collections are provided: [`FixedBufRegistry`] and
9//! [`FixedBufPool`], realizing two different patterns of buffer management.
10//! The `register` method on either of these types is used to register a
11//! collection of buffers with the kernel. It must be called before any of
12//! the [`FixedBuf`] handles to the collection's buffers can be used with
13//! I/O operations.
14//!
15//! [rfa]: crate::fs::File::read_fixed_at
16//! [wfa]: crate::fs::File::write_fixed_at
17
18mod handle;
19pub use handle::FixedBuf;
20
21mod buffers;
22pub(crate) use buffers::FixedBuffers;
23
24mod plumbing;
25
26pub mod pool;
27pub use pool::FixedBufPool;
28
29mod registry;
30pub use registry::FixedBufRegistry;