@@ -222,8 +222,17 @@ impl From<InvalidContentLength> for Error {
222222}
223223
224224/// The output stream for the body, implementing [`AsyncWrite`]. Call
225- /// [`Responder::start_response`] to obtain one. Once the body is complete,
226- /// it must be declared finished, using [`OutgoingBody::finish`].
225+ /// [`Responder::start_response`] or [`Client::start_request`] to obtain
226+ /// one. Once the body is complete, it must be declared finished, using
227+ /// [`Finished::finish`], [`Finished::fail`], [`Client::finish`], or
228+ /// [`Client::fail`].
229+ ///
230+ /// [`Responder::start_response`]: crate::http::server::Responder::start_response
231+ /// [`Client::start_request`]: crate::http::client::Client::start_request
232+ /// [`Finished::finish`]: crate::http::server::Finished::finish
233+ /// [`Finished::fail`]: crate::http::server::Finished::fail
234+ /// [`Client::finish`]: crate::http::client::Client::finish
235+ /// [`Client::fail`]: crate::http::client::Client::fail
227236#[ must_use]
228237pub struct OutgoingBody {
229238 // IMPORTANT: the order of these fields here matters. `stream` must
@@ -288,11 +297,21 @@ impl Drop for DontDropOutgoingBody {
288297 }
289298}
290299
291- /// A placeholder for use as the type parameter to [`Response`] to indicate
292- /// that the body has not yet started. This is used with
293- /// [`Responder::start_response`], which has a `Response<BodyForthcoming>`
294- /// argument.
300+ /// A placeholder for use as the type parameter to [`Request`] and [`Response`]
301+ /// to indicate that the body has not yet started. This is used with
302+ /// [`Client::start_request`] and [`Responder::start_response`], which have
303+ /// `Requeset<BodyForthcoming>` and `Response<BodyForthcoming>` arguments,
304+ /// respectively.
295305///
296306/// To instead start the response and obtain the output stream for the body,
297307/// use [`Responder::respond`].
308+ /// To instead send a request or response with an input stream for the body,
309+ /// use [`Client::send`] or [`Responder::respond`].
310+ ///
311+ /// [`Request`]: crate::http::Request
312+ /// [`Response`]: crate::http::Response
313+ /// [`Client::start_request`]: crate::http::Client::start_request
314+ /// [`Responder::start_response`]: crate::http::server::Responder::start_response
315+ /// [`Client::send`]: crate::http::Client::send
316+ /// [`Responder::respond`]: crate::http::server::Responder::respond
298317pub struct BodyForthcoming ;
0 commit comments