pub trait ConnHandler<Rx, Tx> {
// Provided methods
fn on_ingress(rx: Rx, res: Result<()>) -> impl Future<Output = ()> + Send { ... }
fn on_egress(tx: Tx, res: Result<()>) -> impl Future<Output = ()> + Send { ... }
}
Expand description
Connection handler defines the connection I/O behavior. It is mostly useful for transports that may require additional clean up not already covered by [AsyncWrite::shutdown], for example. This API is experimental and may change in backwards-incompatible ways in the future.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.