Trait bonsaidb::server::HttpService
source · pub trait HttpService: Clone + Send + Sync + 'static {
// Required method
fn handle_connection<'life0, 'life1, 'async_trait, S>(
&'life0 self,
connection: S,
peer: &'life1 Peer
) -> Pin<Box<dyn Future<Output = Result<(), S>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait + AsyncRead + AsyncWrite + Unpin + Send + 'static,
Self: 'async_trait;
}
Expand description
A service that can handle incoming HTTP connections. A convenience
implementation of TcpService
that is useful is you are only serving HTTP
and WebSockets over a service.
Required Methods§
Object Safety§
This trait is not object safe.