We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
conn::http1::Connection::without_shutdown()
1 parent 4899703 commit ad50497Copy full SHA for ad50497
src/client/conn/http1.rs
@@ -93,6 +93,16 @@ where
93
.expect("algready upgraded")
94
.poll_without_shutdown(cx)
95
}
96
+
97
+ /// Prevent shutdown of the underlying IO object at the end of service the request,
98
+ /// instead run `into_parts`. This is a convenience wrapper over `poll_without_shutdown`.
99
+ pub fn without_shutdown(self) -> impl Future<Output = crate::Result<Parts<T>>> {
100
+ let mut conn = Some(self);
101
+ futures_util::future::poll_fn(move |cx| -> Poll<crate::Result<Parts<T>>> {
102
+ ready!(conn.as_mut().unwrap().poll_without_shutdown(cx))?;
103
+ Poll::Ready(Ok(conn.take().unwrap().into_parts()))
104
+ })
105
+ }
106
107
108
/// A builder to configure an HTTP connection.
0 commit comments