pub type CloseHandler = Arc<dyn Fn(Option<CloseFrame>) -> bool + Send + Sync>;Expand description
Handles a peer close frame and decides whether automatic reconnection continues.
Returns true to use the client’s reconnect policy, or false to disconnect without retrying.
The callback runs synchronously on the reader task before it ends. Close frames are delivered
only to this callback, not to the message handler.
Aliased Type§
pub struct CloseHandler { /* private fields */ }