MessageHandler

Trait MessageHandler 

Source
pub trait MessageHandler<Local: Side> {
    // Required methods
    fn handle_request(
        &self,
        request: Local::InRequest,
    ) -> impl Future<Output = Result<Local::OutResponse>>;
    fn handle_notification(
        &self,
        notification: Local::InNotification,
    ) -> impl Future<Output = Result<()>>;
}

Required Methods§

Source

fn handle_request( &self, request: Local::InRequest, ) -> impl Future<Output = Result<Local::OutResponse>>

Source

fn handle_notification( &self, notification: Local::InNotification, ) -> impl Future<Output = Result<()>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§