pub struct Builder<S: EntryMarker = Entry, C: EntryMarker = Entry> { /* private fields */ }
Expand description

IoUring build params

Implementations

Do not make this io_uring instance accessible by child processes after a fork.

Perform busy-waiting for I/O completion events, as opposed to getting notifications via an asynchronous IRQ (Interrupt Request). This will reduce latency, but increases CPU usage.

This is only usable on file systems that support polling and files opened with O_DIRECT.

Use a kernel thread to perform submission queue polling. This allows your application to issue I/O without ever context switching into the kernel, however it does use up a lot more CPU. You should use it when you are expecting very large amounts of I/O.

After idle milliseconds, the kernel thread will go to sleep and you will have to wake it up again with a system call (this is handled by Submitter::submit and Submitter::submit_and_wait automatically).

When using this, you must register all file descriptors with the Submitter via Submitter::register_files.

This requires root priviliges.

Bind the kernel’s poll thread to the specified cpu. This flag is only meaningful when Builder::setup_sqpoll is enabled.

Create the completion queue with the specified number of entries. The value must be greater than entries, and may be rounded up to the next power-of-two.

Clamp the sizes of the submission queue and completion queue at their maximum values instead of returning an error when you attempt to resize them beyond their maximum values.

Share the asynchronous worker thread backend of this io_uring with the specified io_uring file descriptor instead of creating a new thread pool.

Start the io_uring instance with all its rings disabled. This allows you to register restrictions, buffers and files before the kernel starts processing submission queue events. You are only able to register restrictions when the rings are disabled due to concurrency issues. You can enable the rings with Submitter::register_enable_rings.

Requires the unstable feature.

Build an IoUring, with the specified number of entries in the submission queue and completion queue unless setup_cqsize has been called.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.