pub type MessageHandler = Arc<dyn Fn(Message) + Send + Sync>;Expand description
Function type for handling WebSocket messages.
Handler-mode clients spawn an internal task to read messages and pass them to this handler.
This enables automatic reconnection because the client can replace the reader internally.
WebSocketClient::stream_builder returns a
MessageReader instead.
Aliased Typeยง
pub struct MessageHandler { /* private fields */ }