[][src]Struct http_service_hyper::Server

pub struct Server<I: TryStream, S, Sp> { /* fields omitted */ }

A listening HTTP server that accepts connections in both HTTP1 and HTTP2 by default.

Server is a Future mapping a bound listener with a set of service handlers. It is built using the Builder, and the future completes when the server has been shutdown. It should be run by an executor.

Methods

impl<I: TryStream> Server<I, (), ()>[src]

pub fn builder(incoming: I) -> Builder<I, ()>[src]

Starts a Builder with the provided incoming stream.

Trait Implementations

impl<I: TryStream, S, Sp> Debug for Server<I, S, Sp>[src]

impl<I, S, Sp> Future for Server<I, S, Sp> where
    I: TryStream + Unpin,
    I::Ok: AsyncRead + AsyncWrite + Send + Unpin + 'static,
    I::Error: Into<Box<dyn Error + Send + Sync>>,
    S: HttpService,
    Sp: Clone + Send + 'static,
    &'a Sp: Spawn
[src]

type Output = Result<()>

The type of value produced on completion.

Auto Trait Implementations

impl<I, S, Sp> Send for Server<I, S, Sp> where
    I: Send,
    S: Send + Sync,
    Sp: Send

impl<I, S, Sp> !Sync for Server<I, S, Sp>

impl<I, S, Sp> Unpin for Server<I, S, Sp>

impl<I, S, Sp> !UnwindSafe for Server<I, S, Sp>

impl<I, S, Sp> !RefUnwindSafe for Server<I, S, Sp>

Blanket Implementations

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

impl<T> From<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.

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

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

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

impl<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

impl<T> FutureExt for T where
    T: Future + ?Sized