Skip to main content

DispatchLocalClientMessage

Trait DispatchLocalClientMessage 

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