pub trait StreamingEndpointHandler<M>: Send + Syncwhere
M: Message,{
fn handle<'life0, 'async_trait>(
self: &'life0 Arc<Self>,
m: Req<M>,
from: PublicKey
) -> Pin<Box<dyn Future<Output = Resp<M>> + Send + 'async_trait, Global>>
where
'life0: '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
, if it wishes to handle
streams attached to the request and/or to send back streams
attached to the response..
The handler object should be in an Arc, see Endpoint::set_handler