Function gotham::plain::init_server
source · pub async fn init_server<NH, A>(
addr: A,
new_handler: NH
) -> Result<(), StartError>where
NH: NewHandler + 'static,
A: ToSocketAddrs + 'static + Send,
Expand description
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.