#[repr(C)]pub struct Completion {
pub user_data: u64,
pub res: i32,
pub flags: u32,
}Expand description
One reaped completion (struct io_uring_cqe): the user_data you tagged
the submission with, and res (bytes transferred / accepted fd when ≥ 0,
else -errno).
Fields§
§user_data: u64The user_data tag the submission carried.
res: i32Result of the op: bytes transferred or accepted fd (≥ 0) or -errno.
flags: u32io_uring flags (provided-buffer id + multishot armed bit).
Implementations§
Source§impl Completion
impl Completion
Sourcepub fn buffer_id(&self) -> Option<u16>
pub fn buffer_id(&self) -> Option<u16>
The provided-buffer id the kernel filled, if this completion consumed
one (multishot/recv with buffer select). Recycle it via
ProvidedBufRing::recycle once the
bytes are copied out.
Trait Implementations§
Source§impl Clone for Completion
impl Clone for Completion
Source§fn clone(&self) -> Completion
fn clone(&self) -> Completion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Completion
Auto Trait Implementations§
impl Freeze for Completion
impl RefUnwindSafe for Completion
impl Send for Completion
impl Sync for Completion
impl Unpin for Completion
impl UnsafeUnpin for Completion
impl UnwindSafe for Completion
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