pub struct IoUring { /* private fields */ }
Expand description
IoUring instance
Implementations§
Source§impl IoUring
impl IoUring
Sourcepub fn new(entries: u32) -> Result<IoUring>
pub fn new(entries: u32) -> Result<IoUring>
Create a IoUring instance
The entries
sets the size of queue,
and it value should be the power of two.
pub fn params(&self) -> &Parameters
Sourcepub unsafe fn register(&self, target: Target<'_>) -> Result<()>
pub unsafe fn register(&self, target: Target<'_>) -> Result<()>
Register files or user buffers for asynchronous I/O.
Sourcepub fn unregister(&self, target: Target) -> Result<()>
pub fn unregister(&self, target: Target) -> Result<()>
Unregister files or user buffers for asynchronous I/O.
Sourcepub unsafe fn enter(
&self,
to_submit: u32,
min_complete: u32,
flag: u32,
sig: Option<&sigset_t>,
) -> Result<usize>
pub unsafe fn enter( &self, to_submit: u32, min_complete: u32, flag: u32, sig: Option<&sigset_t>, ) -> Result<usize>
Initiate and/or complete asynchronous I/O
§Safety
This provides a raw interface so developer must ensure that parameters are correct.
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
Sourcepub fn split(
&mut self,
) -> (Submitter<'_>, &mut SubmissionQueue, &mut CompletionQueue)
pub fn split( &mut self, ) -> (Submitter<'_>, &mut SubmissionQueue, &mut CompletionQueue)
Get submitter and submission queue and completion queue
Sourcepub fn submission(&mut self) -> &mut SubmissionQueue
pub fn submission(&mut self) -> &mut SubmissionQueue
Get submission queue
Sourcepub fn completion(&mut self) -> &mut CompletionQueue
pub fn completion(&mut self) -> &mut CompletionQueue
Get completion queue
Trait Implementations§
impl Send for IoUring
impl Sync for IoUring
Auto Trait Implementations§
impl Freeze for IoUring
impl RefUnwindSafe for IoUring
impl Unpin for IoUring
impl UnwindSafe for IoUring
Blanket Implementations§
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