Skip to main content

DispatchClientMessage

Trait DispatchClientMessage 

Source
pub trait DispatchClientMessage<H, T>: Sized + 'static
where H: Send, T: Transport,
{ // Required method fn on_event( handler: &mut H, message: Message<T>, ) -> impl Future<Output = Result<(), ProtocolError<<T as Transport>::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 as Transport>::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§