pub struct UringStorageIo { /* private fields */ }Expand description
io_uring storage I/O backend.
One instance per core. Uses SQPOLL for zero-syscall submission and registered buffers for zero-copy writes.
Implementations§
Source§impl UringStorageIo
impl UringStorageIo
Sourcepub fn new(core_id: usize, config: &IoUringConfig) -> Result<Self, IoUringError>
pub fn new(core_id: usize, config: &IoUringConfig) -> Result<Self, IoUringError>
Create a new io_uring backend for a specific core.
§Errors
Returns an error if ring creation fails (insufficient privileges for SQPOLL, unsupported kernel version, etc.).
Sourcepub fn uses_sqpoll(&self) -> bool
pub fn uses_sqpoll(&self) -> bool
Returns true if the underlying ring uses SQPOLL.
Trait Implementations§
Source§impl Debug for UringStorageIo
impl Debug for UringStorageIo
Source§impl Drop for UringStorageIo
impl Drop for UringStorageIo
Source§impl StorageIo for UringStorageIo
impl StorageIo for UringStorageIo
Source§fn register_fd(&mut self, file: File) -> Result<IoFd, StorageIoError>
fn register_fd(&mut self, file: File) -> Result<IoFd, StorageIoError>
Register an already-opened file with this backend. Read more
Source§fn deregister_fd(&mut self, fd: IoFd) -> Result<(), StorageIoError>
fn deregister_fd(&mut self, fd: IoFd) -> Result<(), StorageIoError>
Deregister and close a previously registered file. Read more
Source§fn submit_write(
&mut self,
fd: IoFd,
data: &[u8],
offset: u64,
) -> Result<u64, StorageIoError>
fn submit_write( &mut self, fd: IoFd, data: &[u8], offset: u64, ) -> Result<u64, StorageIoError>
Submit a write at the given file offset. Non-blocking. Read more
Source§fn submit_append(
&mut self,
fd: IoFd,
data: &[u8],
) -> Result<u64, StorageIoError>
fn submit_append( &mut self, fd: IoFd, data: &[u8], ) -> Result<u64, StorageIoError>
Submit an append (write at current end-of-file). Non-blocking. Read more
Source§fn submit_datasync(&mut self, fd: IoFd) -> Result<u64, StorageIoError>
fn submit_datasync(&mut self, fd: IoFd) -> Result<u64, StorageIoError>
Submit an
fdatasync (data-only sync, no metadata). Non-blocking. Read moreSource§fn flush(&mut self) -> Result<usize, StorageIoError>
fn flush(&mut self) -> Result<usize, StorageIoError>
Flush pending submissions to the kernel. Read more
Source§fn poll_completions(&mut self, out: &mut Vec<IoCompletion>)
fn poll_completions(&mut self, out: &mut Vec<IoCompletion>)
Poll for completed operations. Non-blocking. Read more
Source§fn pending_count(&self) -> usize
fn pending_count(&self) -> usize
Returns the number of operations submitted but not yet completed.
Auto Trait Implementations§
impl Freeze for UringStorageIo
impl RefUnwindSafe for UringStorageIo
impl Send for UringStorageIo
impl Sync for UringStorageIo
impl Unpin for UringStorageIo
impl UnsafeUnpin for UringStorageIo
impl UnwindSafe for UringStorageIo
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.