dipper::core::http

Trait HttpConnection

source
pub trait HttpConnection {
    // Required methods
    fn serve(
        self,
        handler: HyperHandler,
        builder: Arc<HttpBuilder>,
        graceful_stop_token: Option<CancellationToken>,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn fusewire(&self) -> Option<Arc<dyn Fusewire + Sync + Send>>;
}
Expand description

A helper trait for http connection.

Required Methods§

source

fn serve( self, handler: HyperHandler, builder: Arc<HttpBuilder>, graceful_stop_token: Option<CancellationToken>, ) -> impl Future<Output = Result<(), Error>> + Send

Serve this http connection.

source

fn fusewire(&self) -> Option<Arc<dyn Fusewire + Sync + Send>>

Get the fusewire of this connection.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C> HttpConnection for StraightStream<C>
where C: AsyncRead + AsyncWrite + Unpin + Send + 'static,