Struct spirit_hyper::BuildServer[][src]

pub struct BuildServer<BS>(pub BS);

A Transformation to turn a Builder into a Server.

The value wrapped in this shall be a closure taking:

It shall produce a server wrapped with a graceful shutdown. Technically, it can produce whatever future that’ll terminate once the Receiver contains something.

Constructing the server builder directly is a bit of a chore (bunch of cloning, lifetimes, and it’s something like 3rd-order function ‒ function that returns a function that returns a function…). In many cases, the server_from_handler can help.

An instance of ServerBuilder goes inside.

Trait Implementations

impl<Tr, Inst, BS> Transformation<Builder<Acceptor<<Tr as Fragment>::Resource>, Exec>, Inst, HyperServer<Tr>> for BuildServer<BS> where
    Tr: Fragment + Clone + Send + 'static,
    Tr::Resource: Send,
    BS: ServerBuilder<Tr> + Clone + Send + 'static,
    BS::OutputFut: Future<Output = Result<(), HyperError>>, 
[src]

type OutputResource = Activate<BS::OutputFut>

The type of resource after the transformation.

type OutputInstaller = FutureInstaller

The type of installer after the transformation. Read more

Auto Trait Implementations

impl<BS> RefUnwindSafe for BuildServer<BS> where
    BS: RefUnwindSafe

impl<BS> Send for BuildServer<BS> where
    BS: Send

impl<BS> Sync for BuildServer<BS> where
    BS: Sync

impl<BS> Unpin for BuildServer<BS> where
    BS: Unpin

impl<BS> UnwindSafe for BuildServer<BS> where
    BS: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoResult<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.