[−][src]Struct iou::SubmissionQueueEvent
A pending IO event.
Can be configured with a set of SubmissionFlags
.
Methods
impl<'a> SubmissionQueueEvent<'a>
[src]
pub fn user_data(&self) -> u64
[src]
Get this event's user data.
pub fn set_user_data(&mut self, user_data: u64)
[src]
Set this event's user data. User data is intended to be used by the application after completion.
sq_event.set_user_data(0xB00); ring.submit_sqes()?; let cq_event = ring.wait_for_cqe()?; assert_eq!(cq_event.user_data(), 0xB00);
pub fn flags(&self) -> SubmissionFlags
[src]
Get this event's flags.
pub fn set_flags(&mut self, flags: SubmissionFlags)
[src]
Set this event's flags.
pub unsafe fn prep_read_vectored(
&mut self,
fd: RawFd,
bufs: &mut [IoSliceMut],
offset: usize
)
[src]
&mut self,
fd: RawFd,
bufs: &mut [IoSliceMut],
offset: usize
)
pub unsafe fn prep_read_fixed(
&mut self,
fd: RawFd,
buf: &mut [u8],
offset: usize,
buf_index: usize
)
[src]
&mut self,
fd: RawFd,
buf: &mut [u8],
offset: usize,
buf_index: usize
)
pub unsafe fn prep_write_vectored(
&mut self,
fd: RawFd,
bufs: &[IoSlice],
offset: usize
)
[src]
&mut self,
fd: RawFd,
bufs: &[IoSlice],
offset: usize
)
pub unsafe fn prep_write_fixed(
&mut self,
fd: RawFd,
buf: &[u8],
offset: usize,
buf_index: usize
)
[src]
&mut self,
fd: RawFd,
buf: &[u8],
offset: usize,
buf_index: usize
)
pub unsafe fn prep_fsync(&mut self, fd: RawFd, flags: FsyncFlags)
[src]
pub unsafe fn prep_timeout(&mut self, ts: &__kernel_timespec)
[src]
Prepare a timeout event.
// make a one-second timeout let timeout_spec: _ = uring_sys::__kernel_timespec { tv_sec: 1 as _, tv_nsec: 0 as _, }; unsafe { sqe.prep_timeout(&timeout_spec); } ring.submit_sqes()?;
pub unsafe fn prep_timeout_with_flags(
&mut self,
ts: &__kernel_timespec,
count: usize,
flags: TimeoutFlags
)
[src]
&mut self,
ts: &__kernel_timespec,
count: usize,
flags: TimeoutFlags
)
pub unsafe fn prep_nop(&mut self)
[src]
Prepare a no-op event.
// example: use a no-op to force a drain let mut nop = ring.next_sqe().unwrap(); nop.set_flags(SubmissionFlags::IO_DRAIN); unsafe { nop.prep_nop(); } ring.submit_sqes()?;
pub fn clear(&mut self)
[src]
Clear event. Clears user data, flags, and any event setup.
sqe.set_user_data(0x1010); sqe.set_flags(SubmissionFlags::IO_DRAIN); sqe.clear(); assert_eq!(sqe.user_data(), 0x0); assert_eq!(sqe.flags(), SubmissionFlags::empty());
pub fn raw(&self) -> &io_uring_sqe
[src]
Get a reference to the underlying uring_sys::io_uring_sqe
object.
You can use this method to inspect the low-level details of an event.
unsafe { sqe.prep_nop(); } let sqe_ref = sqe.raw(); assert_eq!(sqe_ref.len, 0);
pub fn raw_mut(&mut self) -> &mut io_uring_sqe
[src]
Trait Implementations
impl<'a> Send for SubmissionQueueEvent<'a>
[src]
impl<'a> Sync for SubmissionQueueEvent<'a>
[src]
Auto Trait Implementations
impl<'a> Unpin for SubmissionQueueEvent<'a>
impl<'a> !UnwindSafe for SubmissionQueueEvent<'a>
impl<'a> RefUnwindSafe for SubmissionQueueEvent<'a>
Blanket Implementations
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 = !
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,