pub struct H1Close<Transport>(/* private fields */);Expand description
The close of a finished HTTP/1.x connection.
Awaiting it shuts down our sending side of the transport, then reads and discards whatever the client still sends until it closes its side. If the transport is dropped while the client is still sending, the operating system answers with a TCP reset, which can destroy the end of a response the client hasn’t read yet. A client that never closes keeps this pending indefinitely, so await it under a timeout. Dropping it closes the connection immediately.
When the client has already closed the connection, it completes immediately.
Trait Implementations§
Auto Trait Implementations§
impl<Transport> Freeze for H1Close<Transport>where
GracefulClose<Transport>: Freeze,
impl<Transport> RefUnwindSafe for H1Close<Transport>where
GracefulClose<Transport>: RefUnwindSafe,
impl<Transport> Send for H1Close<Transport>where
GracefulClose<Transport>: Send,
impl<Transport> Sync for H1Close<Transport>where
GracefulClose<Transport>: Sync,
impl<Transport> Unpin for H1Close<Transport>where
GracefulClose<Transport>: Unpin,
impl<Transport> UnsafeUnpin for H1Close<Transport>where
GracefulClose<Transport>: UnsafeUnpin,
impl<Transport> UnwindSafe for H1Close<Transport>where
GracefulClose<Transport>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F> FutureExt for F
impl<F> FutureExt for F
Source§fn catch_unwind(self) -> CatchUnwind<Self> ⓘwhere
Self: Sized + UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self> ⓘwhere
Self: Sized + UnwindSafe,
Catches panics while polling the future. Read more
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more