pub struct IoUring<S = Entry, C = Entry>where
    S: EntryMarker,
    C: EntryMarker,{ /* private fields */ }Expand description
IoUring instance
- S: The ring’s submission queue entry (SQE) type, either- squeue::Entryor- squeue::Entry128;
- C: The ring’s completion queue entry (CQE) type, either- cqueue::Entryor- cqueue::Entry32.
Implementations§
Source§impl<S: EntryMarker, C: EntryMarker> IoUring<S, C>
 
impl<S: EntryMarker, C: EntryMarker> IoUring<S, C>
Sourcepub fn builder() -> Builder<S, C>
 
pub fn builder() -> Builder<S, C>
Create a Builder for an IoUring instance.
This allows for further customization than new.
Unlike IoUring::new, this function is available for any combination of submission
queue entry (SQE) and completion queue entry (CQE) types.
Sourcepub fn submitter(&self) -> Submitter<'_>
 
pub fn submitter(&self) -> Submitter<'_>
Get the submitter of this io_uring instance, which can be used to submit submission queue events to the kernel for execution and to register files or buffers with it.
Sourcepub fn params(&self) -> &Parameters
 
pub fn params(&self) -> &Parameters
Get the parameters that were used to construct this instance.
Sourcepub fn submit(&self) -> Result<usize>
 
pub fn submit(&self) -> Result<usize>
Initiate asynchronous I/O. See Submitter::submit for more details.
Sourcepub fn submit_and_wait(&self, want: usize) -> Result<usize>
 
pub fn submit_and_wait(&self, want: usize) -> Result<usize>
Initiate and/or complete asynchronous I/O. See Submitter::submit_and_wait for more
details.
Sourcepub fn split(
    &mut self,
) -> (Submitter<'_>, SubmissionQueue<'_, S>, CompletionQueue<'_, C>)
 
pub fn split( &mut self, ) -> (Submitter<'_>, SubmissionQueue<'_, S>, CompletionQueue<'_, C>)
Get the submitter, submission queue and completion queue of the io_uring instance. This can be used to operate on the different parts of the io_uring instance independently.
If you use this method to obtain sq and cq,
please note that you need to drop or sync the queue before and after submit,
otherwise the queue will not be updated.
Sourcepub fn submission(&mut self) -> SubmissionQueue<'_, S>
 
pub fn submission(&mut self) -> SubmissionQueue<'_, S>
Get the submission queue of the io_uring instance. This is used to send I/O requests to the kernel.
Get the submission queue of the io_uring instance from a shared reference.
§Safety
No other SubmissionQueues may exist when calling this function.
Sourcepub fn completion(&mut self) -> CompletionQueue<'_, C> ⓘ
 
pub fn completion(&mut self) -> CompletionQueue<'_, C> ⓘ
Get completion queue of the io_uring instance. This is used to receive I/O completion events from the kernel.
Get the completion queue of the io_uring instance from a shared reference.
§Safety
No other CompletionQueues may exist when calling this function.