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 create_entry_fallback(self: Pin<&mut Self>) -> OpEntry { ... }
    fn call_blocking(self: Pin<&mut Self>) -> Result<usize, Error> { ... }
    unsafe fn set_result(
        self: Pin<&mut Self>,
        _: &Result<usize, Error>,
        _: &Extra,
    ) { ... }
    unsafe fn push_multishot(
        self: Pin<&mut Self>,
        _: Result<usize, Error>,
        _: Extra,
    ) { ... }
    fn pop_multishot(self: Pin<&mut Self>) -> Option<BufResult<usize, Extra>> { ... }
}
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 create_entry_fallback(self: Pin<&mut Self>) -> OpEntry

Create submission entry for fallback. This method will only be called if create_entry returns an entry with unsupported opcode.

Source

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

Call the operation in a blocking way. This method will be called if

Source

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

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

§Safety

The params must be the result coming from this operation.

Source

unsafe fn push_multishot( self: Pin<&mut Self>, _: Result<usize, Error>, _: Extra, )

Push a multishot result to the inner queue.

§Safety

The params must be the result coming from this operation.

Source

fn pop_multishot(self: Pin<&mut Self>) -> Option<BufResult<usize, Extra>>

Pop a multishot result from the inner queue.

Implementors§

Source§

impl OpCode for CloseFile

Source§

impl OpCode for CloseSocket

Source§

impl OpCode for CreateSocket

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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