Fix documentation for end_of_stream (#219)

The END_STREAM flag is set when the stream is ending, so it needs to be
false if we're sending data.
This commit is contained in:
Steven Fackler
2018-01-25 11:58:41 -08:00
committed by Sean McArthur
parent ef6fef8714
commit ef99f99ae1

View File

@@ -429,14 +429,14 @@ where
/// server's response and the [`SendStream`] instance is used to send a /// server's response and the [`SendStream`] instance is used to send a
/// request body or trailers to the server over the same HTTP/2.0 stream. /// request body or trailers to the server over the same HTTP/2.0 stream.
/// ///
/// To send a request body or trailers, set `end_of_stream` to `true`. Then, /// To send a request body or trailers, set `end_of_stream` to `false`.
/// use the returned [`SendStream`] instance to stream request body chunks /// Then, use the returned [`SendStream`] instance to stream request body
/// or send trailers. If `end_of_stream` is **not** set to `true` then /// chunks or send trailers. If `end_of_stream` is **not** set to `false`
/// attempting to call [`SendStream::send_data`] or /// then attempting to call [`SendStream::send_data`] or
/// [`SendStream::send_trailers`] will result in an error. /// [`SendStream::send_trailers`] will result in an error.
/// ///
/// If no request body or trailers are to be sent, set `end_of_stream` to /// If no request body or trailers are to be sent, set `end_of_stream` to
/// `false` and drop the returned [`SendStream`] instance. /// `true` and drop the returned [`SendStream`] instance.
/// ///
/// # A note on HTTP versions /// # A note on HTTP versions
/// ///