[][src]Struct hyper::server::Serve

#[must_use = "streams do nothing unless polled"]
pub struct Serve<I, S> { /* fields omitted */ }

A stream mapping incoming IOs to new services.

Yields Connections that are futures that should be put on a reactor.

Methods

impl<I, S> Serve<I, S>[src]

pub fn incoming_ref(&self) -> &I[src]

Get a reference to the incoming stream.

Trait Implementations

impl<I: Debug, S: Debug> Debug for Serve<I, S>[src]

impl<I, S, B> Stream for Serve<I, S> where
    I: Stream<Error = Error>,
    I::Item: AsyncRead + AsyncWrite,
    S: NewService<Request = Request, Response = Response<B>, Error = Error>,
    B: Stream<Error = Error>,
    B::Item: AsRef<[u8]>, 
[src]

type Item = Connection<I::Item, S::Instance>

The type of item this stream will yield on success.

type Error = Error

The type of error this stream may generate.

Auto Trait Implementations

impl<I, S> RefUnwindSafe for Serve<I, S> where
    I: RefUnwindSafe,
    S: RefUnwindSafe

impl<I, S> Send for Serve<I, S> where
    I: Send,
    S: Send

impl<I, S> Sync for Serve<I, S> where
    I: Sync,
    S: Sync

impl<I, S> Unpin for Serve<I, S> where
    I: Unpin,
    S: Unpin

impl<I, S> UnwindSafe for Serve<I, S> where
    I: UnwindSafe,
    S: 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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[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.