Struct io_uring::squeue::SubmissionQueue[][src]

pub struct SubmissionQueue<'a> { /* fields omitted */ }

An io_uring instance’s submission queue. This is used to send I/O requests to the kernel.

Implementations

impl SubmissionQueue<'_>[src]

pub fn sync(&mut self)[src]

Synchronize this type with the real submission queue.

This will flush any entries added by push or push_multiple and will update the queue’s length if the kernel has consumed some entries in the meantime.

pub fn need_wakeup(&self) -> bool[src]

When is_setup_sqpoll is set, whether the kernel threads has gone to sleep and requires a system call to wake it up.

pub fn dropped(&self) -> u32[src]

The number of invalid submission queue entries that have been encountered in the ring buffer.

pub fn cq_overflow(&self) -> bool[src]

Returns true if the completion queue ring is overflown.

pub fn capacity(&self) -> usize[src]

Get the total number of entries in the submission queue ring buffer.

pub fn len(&self) -> usize[src]

Get the number of submission queue events in the ring buffer.

pub fn is_empty(&self) -> bool[src]

Returns true if the submission queue ring buffer is empty.

pub fn is_full(&self) -> bool[src]

Returns true if the submission queue ring buffer has reached capacity, and no more events can be added before the kernel consumes some.

pub unsafe fn push(&mut self, Entry: &Entry) -> Result<(), PushError>[src]

Attempts to push an Entry into the queue. If the queue is full, an error is returned.

Safety

Developers must ensure that parameters of the Entry (such as buffer) are valid and will be valid for the entire duration of the operation, otherwise it may cause memory problems.

pub unsafe fn push_multiple(
    &mut self,
    entries: &[Entry]
) -> Result<(), PushError>
[src]

Attempts to push several entries into the queue. If the queue does not have space for all of the entries, an error is returned.

Safety

Developers must ensure that parameters of all the entries (such as buffer) are valid and will be valid for the entire duration of the operation, otherwise it may cause memory problems.

Trait Implementations

impl Drop for SubmissionQueue<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SubmissionQueue<'a>

impl<'a> !Send for SubmissionQueue<'a>

impl<'a> !Sync for SubmissionQueue<'a>

impl<'a> Unpin for SubmissionQueue<'a>

impl<'a> UnwindSafe for SubmissionQueue<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.