Trait PollOpCode
pub 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.
§Implementation notes
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 CreateDir
impl OpCode for CreateSocket
impl OpCode for HardLink
impl OpCode for OpenFile
impl OpCode for PathStat
impl OpCode for Rename
impl OpCode for Symlink
impl OpCode for Unlink
impl<D, F> OpCode for Asyncify<F, D>
impl<S1, S2> OpCode for Splice<S1, S2>
Available on
linux_all only.