Is it able to support implement Body for h2::RecvStream in crate?
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 173
- Forks
- 69
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 4
Description
I think it is convenient if implementing Body for h2::RecvStreamBody as default, because we get http::Request<h2::RecvStream> when we use h2 to handle HTTP2 requests.
impl Body for h2::RecvStream {
type Data = Bytes;
type Error = h2::Error;
fn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Self::Data, Self::Error>>> {
return self.poll_data(cx);
}
fn poll_trailers(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<Option<HeaderMap>, Self::Error>> {
return self.poll_trailers(cx);
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Body trait and the h2::RecvStream methods shown in the issue, then inspect how this crate handles HTTP/2 body implementations. Confirm whether the proposed implementation can be added as a default integration and add coverage demonstrating data and trailer polling for h2::RecvStream.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100