Struct IoUring

Source
pub struct IoUring { /* private fields */ }
Expand description

IoUring instance

Implementations§

Source§

impl IoUring

Source

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.

Source

pub fn params(&self) -> &Parameters

Source

pub unsafe fn register(&self, target: Target<'_>) -> Result<()>

Register files or user buffers for asynchronous I/O.

Source

pub fn unregister(&self, target: Target) -> Result<()>

Unregister files or user buffers for asynchronous I/O.

Source

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.

Source

pub fn submit(&self) -> Result<usize>

Initiate asynchronous I/O.

Source

pub fn submit_and_wait(&self, want: usize) -> Result<usize>

Initiate and/or complete asynchronous I/O

Source

pub fn split( &mut self, ) -> (Submitter<'_>, &mut SubmissionQueue, &mut CompletionQueue)

Get submitter and submission queue and completion queue

Source

pub fn submission(&mut self) -> &mut SubmissionQueue

Get submission queue

Source

pub fn completion(&mut self) -> &mut CompletionQueue

Get completion queue

Trait Implementations§

Source§

impl AsRawFd for IoUring

Source§

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more
Source§

impl Drop for IoUring

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for IoUring

Source§

impl Sync for IoUring

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.