pub unsafe trait PollOpCode {
// Required methods
fn pre_submit(self: Pin<&mut Self>) -> Result<Decision, Error>;
fn operate(self: Pin<&mut Self>) -> Poll<Result<usize, Error>>;
// Provided method
fn op_type(self: Pin<&mut Self>) -> Option<OpType> { ... }
}Expand description
Abstraction of operations.
§Safety
If pre_submit returns Decision::Wait, op_type must also return
Some(OpType::Fd) with same fds as the WaitArgs. Similarly, if
pre_submit returns Decision::Aio, op_type must return
Some(OpType::Aio) with the correct aiocb pointer.
Required Methods§
Provided Methods§
Implementors§
impl OpCode for CloseFile
impl OpCode for CloseSocket
impl OpCode for CreateSocket
impl<D, F> OpCode for Asyncify<F, D>
impl<S1, S2> OpCode for HardLink<S1, S2>
impl<S1, S2> OpCode for Rename<S1, S2>
impl<S1, S2> OpCode for Splice<S1, S2>
Available on
linux_all only.