pub trait IourOpCode {
// Required method
fn create_entry(self: Pin<&mut Self>) -> OpEntry;
// Provided methods
fn call_blocking(self: Pin<&mut Self>) -> Result<usize> { ... }
unsafe fn set_result(self: Pin<&mut Self>, _: usize) { ... }
}
Expand description
Abstraction of io-uring operations.
Required Methods§
Sourcefn create_entry(self: Pin<&mut Self>) -> OpEntry
fn create_entry(self: Pin<&mut Self>) -> OpEntry
Create submission entry.
Provided Methods§
Sourcefn call_blocking(self: Pin<&mut Self>) -> Result<usize>
fn call_blocking(self: Pin<&mut Self>) -> Result<usize>
Call the operation in a blocking way. This method will only be called if
[create_entry
] returns OpEntry::Blocking
.
Sourceunsafe fn set_result(self: Pin<&mut Self>, _: usize)
unsafe fn set_result(self: Pin<&mut Self>, _: usize)
Set the result when it successfully completes. The operation stores the result and is responsible to release it if the operation is cancelled.
§Safety
Users should not call it.