Skip to main content

MessageHandler

Type Alias MessageHandler 

Source
pub type MessageHandler = Arc<dyn Fn(WsClient, Arc<str>) -> BoxFuture<'static, Result<(), Error>> + Send + Sync>;
Expand description

A type-erased event handler. Receives the originating client and the raw JSON data payload (as borrowed text), returns the handler’s Result.

Aliased Type§

pub struct MessageHandler { /* private fields */ }