[−][src]Struct iou::CompletionQueue
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<'_>ⓘ
[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]
Notable traits for CQEsBlocking<'_>
impl<'_> Iterator for CQEsBlocking<'_> type Item = Result<CQE>;
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,