pub trait Handler {
// Required methods
fn completed(&mut self, id: usize, flags: u32, result: Result<usize, Error>);
fn canceled(&mut self, id: usize);
fn tick(&mut self);
fn cleanup(&mut self);
// Provided methods
fn in_flight(&self) -> usize { ... }
fn abandon(&mut self) { ... }
}Required Methods§
Provided Methods§
Sourcefn in_flight(&self) -> usize
fn in_flight(&self) -> usize
Number of submitted operations without their final completion.
The driver waits for them on shutdown, see cleanup.
Sourcefn abandon(&mut self)
fn abandon(&mut self)
Operations are still in flight when the driver stops.
Called instead of cleanup. The handler is leaked
afterwards, so memory referenced by the operations stays valid. It must
not release anything the kernel may still use. Descriptors may be
closed, the shutdown flushed every submission and the kernel holds its
own file reference for each issued operation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".