The return type `http_body_util::Collected::aggregate` is unnamable
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 173
- Forks
- 69
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 4
Description
pub fn aggregate(self) -> impl Buf {
self.bufs
}
Can we turn impl Buf into a namable type (BufList<B>)? It is nice to use impl Buf and all, but today it makes it impossible to use it as a trait associated type.
Example:
trait Bufferer {
type Data: bytes::Buf;
// ...
}
impl<B> Bufferer for Collected<B> {
type Data = ?; // can't just `impl Buf` now
}
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 at http_body_util::Collected::aggregate and inspect the current impl Buf return type and the surrounding Collected definitions. The work is done when the aggregate result has a public, namable type such as BufList that can be used as Bufferer::Data while preserving the bytes::Buf behavior.
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
- 35/100