pub struct IoUringConfigBuilder { /* private fields */ }Expand description
Builder for IoUringConfig.
Implementations§
Source§impl IoUringConfigBuilder
impl IoUringConfigBuilder
Sourcepub const fn ring_entries(self, entries: u32) -> Self
pub const fn ring_entries(self, entries: u32) -> Self
Set the number of ring entries.
Sourcepub const fn enable_sqpoll(self, idle_ms: u32) -> Self
pub const fn enable_sqpoll(self, idle_ms: u32) -> Self
Enable SQPOLL mode with the specified idle timeout.
Sourcepub const fn sqpoll_cpu(self, cpu: u32) -> Self
pub const fn sqpoll_cpu(self, cpu: u32) -> Self
Set the CPU for the SQPOLL kernel thread.
Sourcepub const fn enable_iopoll(self) -> Self
pub const fn enable_iopoll(self) -> Self
Enable IOPOLL mode (for NVMe devices).
Sourcepub const fn buffer_size(self, size: usize) -> Self
pub const fn buffer_size(self, size: usize) -> Self
Set the size of each buffer in the pool.
Sourcepub const fn buffer_count(self, count: usize) -> Self
pub const fn buffer_count(self, count: usize) -> Self
Set the number of buffers in the pool.
Sourcepub const fn coop_taskrun(self, enable: bool) -> Self
pub const fn coop_taskrun(self, enable: bool) -> Self
Enable cooperative task running.
Sourcepub const fn single_issuer(self, enable: bool) -> Self
pub const fn single_issuer(self, enable: bool) -> Self
Enable single-issuer optimization.
Sourcepub const fn direct_table(self, size: u32) -> Self
pub const fn direct_table(self, size: u32) -> Self
Enable direct file descriptor table.
Sourcepub fn build(self) -> Result<IoUringConfig, IoUringError>
pub fn build(self) -> Result<IoUringConfig, IoUringError>
Sourcepub fn build_unchecked(self) -> IoUringConfig
pub fn build_unchecked(self) -> IoUringConfig
Build the configuration without validation (for testing).
Trait Implementations§
Source§impl Debug for IoUringConfigBuilder
impl Debug for IoUringConfigBuilder
Source§impl Default for IoUringConfigBuilder
impl Default for IoUringConfigBuilder
Source§fn default() -> IoUringConfigBuilder
fn default() -> IoUringConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IoUringConfigBuilder
impl RefUnwindSafe for IoUringConfigBuilder
impl Send for IoUringConfigBuilder
impl Sync for IoUringConfigBuilder
impl Unpin for IoUringConfigBuilder
impl UnsafeUnpin for IoUringConfigBuilder
impl UnwindSafe for IoUringConfigBuilder
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.