pub trait ServerBootstrap {
// Required method
fn bootstrap_server(
&self,
config: &ServerConfig,
) -> BoxFuture<'_, Result<TcpListener, ServerBootstrapError>>;
}
Expand description
Trait for components responsible for creating web servers from ServerConfig. Create a component implementing this trait to override the default bootstrap.
Required Methods§
Sourcefn bootstrap_server(
&self,
config: &ServerConfig,
) -> BoxFuture<'_, Result<TcpListener, ServerBootstrapError>>
fn bootstrap_server( &self, config: &ServerConfig, ) -> BoxFuture<'_, Result<TcpListener, ServerBootstrapError>>
Create a [Builder] which will them be used to create a web server.