[][src]Function gotham::tls::init_server

pub async fn init_server<NH, A>(
    addr: A,
    new_handler: NH,
    tls_config: ServerConfig
) -> Result<(), ()> where
    NH: NewHandler + 'static,
    A: ToSocketAddrs + 'static + Send

Returns a Future used to spawn an Gotham application.

This is used internally, but exposed in case the developer intends on doing any manual wiring that isn't supported by the Gotham API. It's unlikely that this will be required in most use cases; it's mainly exposed for shutdown handling.