compio_driver

Trait IourOpCode

Source
pub 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.

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 + Sync + 'static> OpCode for Asyncify<F, D>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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