Skip to main content

LocalClientHandler

Trait LocalClientHandler 

Source
pub trait LocalClientHandler<T: Transport> {
    // Required method
    fn on_event(
        &mut self,
        message: Message<T>,
    ) -> impl Future<Output = Result<(), ProtocolError<T::Error>>>;
}
Expand description

A type which handles incoming events for a local client.

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

Required Methods§

Source

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

Handles a received client event.

See ClientHandler::on_event for more information.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§