[−][src]Struct hyper::server::conn::Connection
A future binding a connection with a Service.
Polling this future will drive HTTP forward.
Methods
impl<I, B, S> Connection<I, S> where
S: Service<Request = Request, Response = Response<B>, Error = Error> + 'static,
I: AsyncRead + AsyncWrite + 'static,
B: Stream<Error = Error> + 'static,
B::Item: AsRef<[u8]>,
[src][−]
S: Service<Request = Request, Response = Response<B>, Error = Error> + 'static,
I: AsyncRead + AsyncWrite + 'static,
B: Stream<Error = Error> + 'static,
B::Item: AsRef<[u8]>,
pub fn disable_keep_alive(&mut self)
[src][−]
Disables keep-alive for this connection.
pub fn into_parts(self) -> Parts<I, S>
[src][−]
Return the inner IO object, and additional information.
This should only be called after poll_without_shutdown
signals
that the connection is "done". Otherwise, it may not have finished
flushing all necessary HTTP bytes.
pub fn poll_without_shutdown(&mut self) -> Poll<(), Error>
[src][−]
Poll the connection for completion, but without calling shutdown
on the underlying IO.
This is useful to allow running a connection while doing an HTTP
upgrade. Once the upgrade is completed, the connection would be "done",
but it is not desired to actally shutdown the IO object. Instead you
would take it back using into_parts
.
Trait Implementations
impl<I, S> Debug for Connection<I, S> where
S: HyperService,
S::ResponseBody: Stream<Error = Error>,
<S::ResponseBody as Stream>::Item: AsRef<[u8]>,
[src][+]
S: HyperService,
S::ResponseBody: Stream<Error = Error>,
<S::ResponseBody as Stream>::Item: AsRef<[u8]>,
impl<I, B, S> Future for Connection<I, S> where
S: Service<Request = Request, Response = Response<B>, Error = Error> + 'static,
I: AsyncRead + AsyncWrite + 'static,
B: Stream<Error = Error> + 'static,
B::Item: AsRef<[u8]>,
[src][+]
S: Service<Request = Request, Response = Response<B>, Error = Error> + 'static,
I: AsyncRead + AsyncWrite + 'static,
B: Stream<Error = Error> + 'static,
B::Item: AsRef<[u8]>,
Auto Trait Implementations
impl<I, S> !RefUnwindSafe for Connection<I, S>
impl<I, S> Send for Connection<I, S> where
I: Send,
S: Send,
<S as Service>::Future: Send,
<<S as HyperService>::ResponseBody as Stream>::Item: Send,
<S as HyperService>::ResponseBody: Send,
I: Send,
S: Send,
<S as Service>::Future: Send,
<<S as HyperService>::ResponseBody as Stream>::Item: Send,
<S as HyperService>::ResponseBody: Send,
impl<I, S> Sync for Connection<I, S> where
I: Sync,
S: Sync,
<S as Service>::Future: Sync,
<<S as HyperService>::ResponseBody as Stream>::Item: Sync,
<S as HyperService>::ResponseBody: Sync,
I: Sync,
S: Sync,
<S as Service>::Future: Sync,
<<S as HyperService>::ResponseBody as Stream>::Item: Sync,
<S as HyperService>::ResponseBody: Sync,
impl<I, S> Unpin for Connection<I, S> where
I: Unpin,
S: Unpin,
<S as Service>::Future: Unpin,
<<S as HyperService>::ResponseBody as Stream>::Item: Unpin,
<S as HyperService>::ResponseBody: Unpin,
I: Unpin,
S: Unpin,
<S as Service>::Future: Unpin,
<<S as HyperService>::ResponseBody as Stream>::Item: Unpin,
<S as HyperService>::ResponseBody: Unpin,
impl<I, S> !UnwindSafe for Connection<I, S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> FutureExt for T where
T: Future + ?Sized,
[src][+]
T: Future + ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<F> IntoFuture for F where
F: Future,
[src][+]
F: Future,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,