pub trait OpCode<C: OpCompletion> {
type Error;
// Required methods
fn submission(&mut self) -> Result<C, Self::Error>;
fn completion(&mut self, _: Pin<&mut C>) -> Result<(), Self::Error>;
}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 Associated Types§
Required Methods§
Sourcefn submission(&mut self) -> Result<C, Self::Error>
fn submission(&mut self) -> Result<C, Self::Error>
Turn the abstract OpCoe into Submission that will be pending completion. io-uring-bearer will call this in order to convert the higher level type into actual submission.