Skip to content

Commit

Permalink
document return values
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed May 7, 2024
1 parent 395b18e commit 79b98c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion http-body/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@ pub trait Body {
/// Attempt to progress the body's state without pulling a new frame.
///
/// `Body` consumers can use this method to allow the `Body` implementation to continue to
/// perform work even when the consumer is not yet ready to read the next frame. For example,
/// perform work even when the consumer is not yet ready to read the next frame. For example,
/// a `Body` implementation could maintain a timer counting down between `poll_frame` calls and
/// report an error from `poll_progress` when time expires.
///
/// Consumers are *not* required to call this method. A `Body` implementation should not depend
/// on calls to `poll_progress` to occur.
///
/// An error returned from this method is considered to be equivalent to an error returned from
/// `poll_frame`.
///
/// Implementations must allow additional calls to this method after it returns
/// `Poll::Ready(Ok(())`.
fn poll_progress(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
let _ = cx;
Poll::Ready(Ok(()))
Expand Down

0 comments on commit 79b98c2

Please sign in to comment.