Skip to content

Commit b44737c

Browse files
authored
Merge pull request #58 from sunfishcode/sunfishcode/fix-docs
Fix broken links in documentation comments.
2 parents 1e91009 + 9f12e2d commit b44737c

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

src/http/body.rs

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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]
228237
pub 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
298317
pub struct BodyForthcoming;

src/http/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl Responder {
147147
}
148148

149149
/// An opaque value returned from a handler indicating that the body is
150-
/// finished, either by [`OutgoingBody::finish`] or [`OutgoingBody::fail`].
150+
/// finished, either by [`Finished::finish`] or [`Finished::fail`].
151151
pub struct Finished(pub(crate) ());
152152

153153
impl Finished {

src/runtime/reactor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::collections::HashMap;
99
use std::rc::Rc;
1010
use wasi::io::poll::Pollable;
1111

12-
/// A key for a Pollable, which is an index into the Slab<Pollable> in Reactor.
12+
/// A key for a `Pollable`, which is an index into the `Slab<Pollable>` in `Reactor`.
1313
#[repr(transparent)]
1414
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
1515
pub(crate) struct EventKey(pub(crate) usize);

0 commit comments

Comments
 (0)