File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,16 @@ pub struct AddrIncoming {
105105/// A future binding a connection with a Service.
106106///
107107/// Polling this future will drive HTTP forward.
108+ ///
109+ /// # Note
110+ ///
111+ /// This will currently yield an unnameable (`Opaque`) value
112+ /// on success. The purpose of this is that nothing can be assumed about
113+ /// the type, not even it's name. It's probable that in a later release,
114+ /// this future yields the underlying IO object, which could be done without
115+ /// a breaking change.
116+ ///
117+ /// It is likely best to just map the value to `()`, for now.
108118#[ must_use = "futures do nothing unless polled" ]
109119pub struct Connection < I , S >
110120where
Original file line number Diff line number Diff line change @@ -30,17 +30,10 @@ impl<B: AsRef<[u8]> + 'static> Http<B> {
3030 /// Use this `Http` instance to create a new server task which handles the
3131 /// connection `io` provided.
3232 ///
33- /// This is the low-level method used to actually spawn handling a TCP
34- /// connection, typically. The `handle` provided is the event loop on which
35- /// the server task will be spawned, `io` is the I/O object associated with
36- /// this connection (data that's read/written), `remote_addr` is the remote
37- /// peer address of the HTTP client, and `service` defines how HTTP requests
38- /// will be handled (and mapped to responses).
33+ /// # Deprecated
3934 ///
40- /// This method is typically not invoked directly but is rather transitively
41- /// used through [`bind`](#method.bind). This can be useful,
42- /// however, when writing mocks or accepting sockets from a non-TCP
43- /// location.
35+ /// This method is deprecated. If seeking a replacement, consider
36+ /// `Http::serve_connection`.
4437 pub fn bind_connection < S , I , Bd > ( & self ,
4538 handle : & Handle ,
4639 io : I ,
You can’t perform that action at this time.
0 commit comments