Trait OpCode

Source
pub trait OpCode<C: OpCompletion> {
    // Required methods
    fn submission(self) -> Result<C, OpError>;
    fn completion(&mut self, _: Pin<&mut C>) -> Result<(), OpError>;
}
Expand description

The contracting type between io-uring-bearer and all the opcodes it can carry. Implement this type in the individual opcodes that can be used in the bearer.

Required Methods§

Source

fn submission(self) -> Result<C, OpError>

It is recommended that you use a harmonized error type but is not mandatory.

Source

fn completion(&mut self, _: Pin<&mut C>) -> Result<(), OpError>

io-uring-bearer will call this upno completion

Implementors§