Skip to main content

IourOpCode

Trait IourOpCode 

Source
pub unsafe trait IourOpCode {
    // Required method
    fn create_entry(self: Pin<&mut Self>) -> OpEntry;

    // Provided methods
    fn call_blocking(self: Pin<&mut Self>) -> Result<usize> { ... }
    unsafe fn set_result(self: Pin<&mut Self>, _: usize) { ... }
}
Expand description

Abstraction of io-uring operations.

§Safety

The returned Entry from create_entry must be valid until the operation is completed.

Required Methods§

Source

fn create_entry(self: Pin<&mut Self>) -> OpEntry

Create submission entry.

Provided Methods§

Source

fn call_blocking(self: Pin<&mut Self>) -> Result<usize>

Call the operation in a blocking way. This method will only be called if create_entry returns OpEntry::Blocking.

Source

unsafe fn set_result(self: Pin<&mut Self>, _: usize)

Set the result when it successfully completes. The operation stores the result and is responsible to release it if the operation is cancelled.

§Safety

Users should not call it.

Implementors§

Source§

impl OpCode for CloseFile

Source§

impl OpCode for CloseSocket

Source§

impl OpCode for CreateDir

Source§

impl OpCode for CreateSocket

Source§

impl OpCode for OpenFile

Source§

impl OpCode for PathStat

Source§

impl OpCode for Rename

Source§

impl<D: Send + 'static, F: FnOnce() -> BufResult<usize, D> + Send + 'static> OpCode for Asyncify<F, D>

Source§

impl<S1: AsFd, S2: AsFd> OpCode for Splice<S1, S2>

Source§

impl<S, D: Send + 'static, F: FnOnce(&S) -> BufResult<usize, D> + Send + 'static> OpCode for AsyncifyFd<S, F, D>

Source§

impl<S: AsFd> OpCode for Accept<S>

Source§

impl<S: AsFd> OpCode for Connect<S>

Source§

impl<S: AsFd> OpCode for FileStat<S>

Source§

impl<S: AsFd> OpCode for PollOnce<S>

Source§

impl<S: AsFd> OpCode for ReadManaged<S>

Source§

impl<S: AsFd> OpCode for ReadManagedAt<S>

Source§

impl<S: AsFd> OpCode for RecvManaged<S>

Source§

impl<S: AsFd> OpCode for ShutdownSocket<S>

Source§

impl<S: AsFd> OpCode for Sync<S>

Source§

impl<S: AsFd> OpCode for TruncateFile<S>

Source§

impl<T: IoBuf, S: AsFd> OpCode for Send<T, S>

Source§

impl<T: IoBuf, S: AsFd> OpCode for SendTo<T, S>

Source§

impl<T: IoBuf, S: AsFd> OpCode for Write<T, S>

Source§

impl<T: IoBuf, S: AsFd> OpCode for WriteAt<T, S>

Source§

impl<T: IoBufMut, S: AsFd> OpCode for Read<T, S>

Source§

impl<T: IoBufMut, S: AsFd> OpCode for ReadAt<T, S>

Source§

impl<T: IoBufMut, S: AsFd> OpCode for Recv<T, S>

Source§

impl<T: IoBufMut, S: AsFd> OpCode for RecvFrom<T, S>

Source§

impl<T: IoVectoredBuf, C: IoBuf, S: AsFd> OpCode for SendMsg<T, C, S>

Source§

impl<T: IoVectoredBuf, S: AsFd> OpCode for SendToVectored<T, S>

Source§

impl<T: IoVectoredBuf, S: AsFd> OpCode for SendVectored<T, S>

Source§

impl<T: IoVectoredBuf, S: AsFd> OpCode for WriteVectored<T, S>

Source§

impl<T: IoVectoredBuf, S: AsFd> OpCode for WriteVectoredAt<T, S>

Source§

impl<T: IoVectoredBufMut, C: IoBufMut, S: AsFd> OpCode for RecvMsg<T, C, S>

Source§

impl<T: IoVectoredBufMut, S: AsFd> OpCode for ReadVectored<T, S>

Source§

impl<T: IoVectoredBufMut, S: AsFd> OpCode for ReadVectoredAt<T, S>

Source§

impl<T: IoVectoredBufMut, S: AsFd> OpCode for RecvFromVectored<T, S>

Source§

impl<T: IoVectoredBufMut, S: AsFd> OpCode for RecvVectored<T, S>