Skip to main content

HttpAdapter

Trait HttpAdapter 

Source
pub trait HttpAdapter {
    type Output;

    // Required methods
    fn build(&self, app: BootApplication) -> Result<Self::Output>;
    fn serve(
        &self,
        app: BootApplication,
        addr: SocketAddr,
    ) -> BoxFuture<'static, Result<()>>;
}
Expand description

Adapter that turns a Boot application into a concrete HTTP server/router.

Required Associated Types§

Required Methods§

Source

fn build(&self, app: BootApplication) -> Result<Self::Output>

Source

fn serve( &self, app: BootApplication, addr: SocketAddr, ) -> BoxFuture<'static, Result<()>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§