pub trait Callbackwhere
Self: Send + 'static,{
// Required method
fn send(self, res: Result<(), Error>);
}Expand description
A trait for handling IO operation callbacks.
This trait defines a mechanism to send IO operation results back to the caller, typically used for asynchronous IO operations.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Callback for SyncSender<Result<(), Error>>
Implementation of the Callback trait for SyncSender.
impl Callback for SyncSender<Result<(), Error>>
Implementation of the Callback trait for SyncSender.
This allows using a synchronous channel sender as a callback mechanism for IO operations.