Skip to content

Commit 9f12e2d

Browse files
committed
Add more documentation about Client::start_request.
1 parent 0402ced commit 9f12e2d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/http/body.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,21 @@ impl Drop for DontDropOutgoingBody {
297297
}
298298
}
299299

300-
/// A placeholder for use as the type parameter to [`Response`] to indicate
301-
/// that the body has not yet started. This is used with
302-
/// [`Responder::start_response`], which has a `Response<BodyForthcoming>`
303-
/// 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.
304305
///
305306
/// To instead start the response and obtain the output stream for the body,
306307
/// 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`].
307310
///
311+
/// [`Request`]: crate::http::Request
308312
/// [`Response`]: crate::http::Response
313+
/// [`Client::start_request`]: crate::http::Client::start_request
309314
/// [`Responder::start_response`]: crate::http::server::Responder::start_response
315+
/// [`Client::send`]: crate::http::Client::send
310316
/// [`Responder::respond`]: crate::http::server::Responder::respond
311317
pub struct BodyForthcoming;

0 commit comments

Comments
 (0)