Trait Callback

Source
pub trait Callback {
    // 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§

Source

fn send(self, res: Result<(), Error>)

Sends the result of a IO operation back to the caller.

§Arguments
  • res - The result of the operation, either success (Ok(())) or an IO error

Implementations on Foreign Types§

Source§

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.

Source§

fn send(self, res: Result<(), Error>)

Implementors§