IourOpCode

Trait IourOpCode 

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

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

Abstraction of io-uring operations.

Required Methods§

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

Create submission entry.

Provided Methods§

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

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

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§

§

impl OpCode for CloseFile

§

impl OpCode for CloseSocket

§

impl OpCode for CreateDir

§

impl OpCode for CreateSocket

§

impl OpCode for OpenFile

§

impl OpCode for PathStat

§

impl OpCode for Rename

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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