[][src]Struct iou::CompletionQueue

pub struct CompletionQueue<'ring> { /* fields omitted */ }

The queue of completed IO events.

Each element is a CQE.

Completion does not imply success. Completed events may be timeouts.

Implementations

impl<'ring> CompletionQueue<'ring>[src]

pub fn peek_for_cqe(&mut self) -> Option<CQE>[src]

Returns the next CQE if any are available.

pub fn wait_for_cqe(&mut self) -> Result<CQE>[src]

Returns the next CQE, blocking the thread until one is ready if necessary.

pub fn wait(&mut self, count: u32) -> Result<()>[src]

Block the thread until at least count CQEs are ready.

These CQEs can be processed using peek_for_cqe or the cqes iterator.

pub fn cqes(&mut self) -> CQEs<'_>

Notable traits for CQEs<'_>

impl<'_> Iterator for CQEs<'_> type Item = CQE;
[src]

Returns an iterator of ready CQEs.

When there are no CQEs ready to process, the iterator will end. It will never block the thread to wait for CQEs to be completed.

pub fn cqes_blocking(&mut self, wait_for: u32) -> CQEsBlocking<'_>

Notable traits for CQEsBlocking<'_>

impl<'_> Iterator for CQEsBlocking<'_> type Item = Result<CQE>;
[src]

Returns an iterator of ready CQEs, blocking when there are none ready.

This iterator never ends. Whenever there are no CQEs ready, it will block the thread until at least wait_for CQEs are ready.

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

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

pub fn eventfd_toggle(&mut self, enabled: bool) -> Result<()>[src]

Trait Implementations

impl<'_> Debug for CompletionQueue<'_>[src]

impl<'ring> Send for CompletionQueue<'ring>[src]

impl<'ring> Sync for CompletionQueue<'ring>[src]

Auto Trait Implementations

impl<'ring> RefUnwindSafe for CompletionQueue<'ring>

impl<'ring> Unpin for CompletionQueue<'ring>

impl<'ring> !UnwindSafe for CompletionQueue<'ring>

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.