Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: notes on poll_frame return values #144

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

cratelyn
Copy link
Contributor

this commit introduces some additional documentation for Body::poll_frame(..).

this adds some explicit information about what different return values indicate, and how callers are expected to respond to particular outcomes. these docs are modeled after the equivalent sections in the documentation of Stream and Future.

Signed-off-by: katelyn martin <me+cratelyn@katelyn.world>
@@ -44,6 +44,21 @@ pub trait Body {

#[allow(clippy::type_complexity)]
/// Attempt to pull out the next data buffer of this stream.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this isn't part of the PR, but I just noticed this is old. I think this is when the functions were separate, poll_data and poll_trailers. It should mention just the "next frame" instead of data specifically.

If you want to fix it up :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! i didn't want to change it unprompted, but i can do that.

eeafd33

http-body/src/lib.rs Show resolved Hide resolved
Signed-off-by: katelyn martin <me+cratelyn@katelyn.world>
@seanmonstar seanmonstar merged commit 1090bff into hyperium:master Jan 31, 2025
8 checks passed
@cratelyn cratelyn deleted the poll-frame-docs branch January 31, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants