[−][src]Struct hyper::client::conn::Connection
A future that processes all HTTP state for the IO object.
In most cases, this should just be spawned into an executor, so that it can process incoming and outgoing messages, notice hangups, and the like.
Methods
impl<T, B> Connection<T, B> where
T: AsyncRead + AsyncWrite + Send + 'static,
B: Payload + 'static,
[src][−]
T: AsyncRead + AsyncWrite + Send + 'static,
B: Payload + 'static,
pub fn into_parts(self) -> Parts<T>
[src][−]
Return the inner IO object, and additional information.
Only works for HTTP/1 connections. HTTP/2 connections will panic.
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<T, B> Debug for Connection<T, B> where
T: AsyncRead + AsyncWrite + Debug + Send + 'static,
B: Payload + 'static,
[src][+]
T: AsyncRead + AsyncWrite + Debug + Send + 'static,
B: Payload + 'static,
impl<T, B> Future for Connection<T, B> where
T: AsyncRead + AsyncWrite + Send + 'static,
B: Payload + 'static,
[src][+]
T: AsyncRead + AsyncWrite + Send + 'static,
B: Payload + 'static,
Auto Trait Implementations
impl<T, B> Send for Connection<T, B> where
<B as Payload>::Data: Buf + Send,
<B as Payload>::Data: Buf + Send,
impl<T, B> Sync for Connection<T, B> where
B: Sync,
T: Sync,
<B as Payload>::Data: Buf + Send + Sync,
B: Sync,
T: Sync,
<B as Payload>::Data: Buf + Send + Sync,
Blanket Implementations
impl<T> From for T
[src][−]
impl<T, U> Into for T where
U: From<T>,
[src][−]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src][−]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
impl<T> Borrow for T where
T: ?Sized,
[src][−]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src][−]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src][−]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src][−]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src][−]
impl<T> Any for T where
T: 'static + ?Sized,
[src][−]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src][−]
impl<F> IntoFuture for F where
F: Future,
[src][−]
F: Future,
type Future = F
The future that this type can be converted into.
type Item = <F as Future>::Item
The item that the future may resolve with.
type Error = <F as Future>::Error
The error that the future may resolve with.
fn into_future(self) -> F
[src][−]
impl<T> FutureExt for T where
T: Future + ?Sized,
[src][−]
T: Future + ?Sized,
fn timeout(self, timeout: Duration) -> Timeout<Self>
[src][−]
Creates a new future which allows self
until timeout
. Read more