Skip to main content

DispatchLocalClientMessage

Trait DispatchLocalClientMessage 

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

A protocol which dispatches incoming client messages to a local handler.

This is a variant of DispatchClientMessage that does not require implementing Send and only supports local-thread executors.

Required Methods§

Source

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

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§