pub trait HandleConnectionClose<Counterpart: Role>: Send {
// Required method
fn handle_connection_close(
self,
connection: ConnectionTo<Counterpart>,
) -> impl Future<Output = Result<(), Error>> + Send;
}Expand description
A handler that runs after the incoming transport reaches clean EOF.
Close handlers are composed by Builder::on_close
and run sequentially in registration order. Unlike
RunWithConnectionTo, they are a distinct
connection-lifecycle phase rather than concurrent background work.
Required Methods§
Sourcefn handle_connection_close(
self,
connection: ConnectionTo<Counterpart>,
) -> impl Future<Output = Result<(), Error>> + Send
fn handle_connection_close( self, connection: ConnectionTo<Counterpart>, ) -> impl Future<Output = Result<(), Error>> + Send
Run this handler during clean incoming-transport shutdown.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".