Skip to content

Commit

Permalink
Fix doc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Sep 21, 2023
1 parent ab991fd commit fc58a2e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/wasi-http/src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ impl HostInputStream for HostIncomingBodyStream {
impl HostIncomingBody {
/// Consume the state held in the [`HostIncomingBody`] to spawn a task that will drive the
/// streaming body to completion. Data segments will be communicated out over the
/// [`DataReceiver`] channel, and a [`HostFutureTrailers`] gives a way to block on/retrieve the
/// trailers.
/// [`HostIncomingBodyStream`], and a [`HostFutureTrailers`] gives a way to block on/retrieve
/// the trailers.
pub fn new(mut body: hyper::body::Incoming, between_bytes_timeout: Duration) -> Self {
let (body_writer, body_receiver) = mpsc::channel(1);
let (trailer_writer, trailers) = oneshot::channel();
Expand Down Expand Up @@ -450,15 +450,14 @@ impl Worker {
}
}

/// Provides a [`HostOutputStream`] impl from a [`tokio::io::AsyncWrite`] impl
/// Provides a [`HostOutputStream`] impl from a [`tokio::sync::mpsc::Sender`].
pub struct BodyWriteStream {
worker: Arc<Worker>,
_join_handle: preview2::AbortOnDropJoinHandle<()>,
}

impl BodyWriteStream {
/// Create a [`AsyncWriteStream`]. In order to use the [`HostOutputStream`] impl
/// provided by this struct, the argument must impl [`tokio::io::AsyncWrite`].
/// Create a [`BodyWriteStream`].
pub fn new(write_budget: usize, writer: mpsc::Sender<Bytes>) -> Self {
let worker = Arc::new(Worker::new(write_budget));

Expand Down

0 comments on commit fc58a2e

Please sign in to comment.