pub trait EndpointHandler<M>: Send + Syncwhere
    M: Message,
{ fn handle<'life0, 'life1, 'async_trait>(
        self: &'life0 Arc<Self>,
        m: &'life1 M,
        from: PublicKey
    ) -> Pin<Box<dyn Future<Output = <M as Message>::Response> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

This trait should be implemented by an object of your application that can handle a message of type M, in the cases where it doesn’t care about attached stream in the request nor in the response.

Required Methods§

Implementations on Foreign Types§

If one simply wants to use an endpoint in a client fashion, without locally serving requests to that endpoint, use the unit type () as the handler type: it will panic if it is ever made to handle request.

Implementors§