File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -49,17 +49,21 @@ pub trait Body {
4949 cx : & mut Context < ' _ > ,
5050 ) -> Poll < Option < Result < Frame < Self :: Data > , Self :: Error > > > ;
5151
52- /// Returns `true` when the end of stream has been reached.
52+ /// A hint that may return `true` when the end of stream has been reached.
5353 ///
5454 /// An end of stream means that `poll_frame` will return `None`.
5555 ///
5656 /// A return value of `false` **does not** guarantee that a value will be
57- /// returned from `poll_frame`.
57+ /// returned from `poll_frame`. Combinators or other implementations may
58+ /// not be able to know the end of stream has been reached for this hint.
59+ ///
60+ /// Returning `true` allows consumers of this body to optimize, such as not
61+ /// calling `poll_frame` again.
5862 fn is_end_stream ( & self ) -> bool {
5963 false
6064 }
6165
62- /// Returns the bounds on the remaining length of the stream.
66+ /// A hint that returns the bounds on the remaining length of the stream.
6367 ///
6468 /// When the **exact** remaining length of the stream is known, the upper bound will be set and
6569 /// will equal the lower bound.
You can’t perform that action at this time.
0 commit comments