Trait coap::server::RequestHandler
source · pub trait RequestHandler: Send + Sync + 'static {
// Required method
fn handle_request<'life0, 'async_trait>(
&'life0 self,
request: Box<CoapRequest<SocketAddr>>
) -> Pin<Box<dyn Future<Output = Box<CoapRequest<SocketAddr>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A trait for handling incoming requests. Use this instead of a closure if you want to modify some external state