Skip to main content

DispatchClientMessage

Trait DispatchClientMessage 

Source
pub trait DispatchClientMessage<H: Send, T: Transport>: Sized + 'static {
    // Required method
    fn on_event(
        handler: &mut H,
        message: Message<T>,
    ) -> impl Future<Output = Result<(), ProtocolError<T::Error>>> + Send;
}
Expand description

A protocol which dispatches incoming client messages to a handler.

Required Methods§

Source

fn on_event( handler: &mut H, message: Message<T>, ) -> impl Future<Output = Result<(), ProtocolError<T::Error>>> + Send

Handles a received client event with the given handler.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§