Trait spirit_hyper::ConnAction[][src]

pub trait ConnAction<S, O, C, ExtraCfg> where
    S: Borrow<ArcSwap<C>> + Sync + Send + 'static, 
{ type IntoFuture; fn action(&self, _: &Arc<Spirit<S, O, C>>, _: &ExtraCfg) -> Self::IntoFuture; }

A trait describing the connection action.

This is usually a function Fn(&Arc<Spirit>, &ExtraCfg) -> impl IntoFuture<Item = (impl Service, Http), Error>

It is similar to hyper::NewService, but with extra access to the spirit and extra config from the transport fragment.

Associated Types

The type the function-like thing returns.

Required Methods

Performs the action.

This should create the hyper::Service used to handle a connection.

Implementors