Description
In current API, most traits of futures-rs are splitted into 2 variants - one for implementors, and one for consumers. Formers are named without suffix, and latters are named with Ext
suffix.
Ironically those pair traits are mostly disjoint in usage pattern. For example, a library which expose a type that impls Stream
doesn't need to know about StreamExt
trait in their code at all. And if I want to write a binary with heavy business logic, I don't want to care about poll_next()
method so will only use StreamExt
trait.
But in practice, there's way more library consumers than library writers, so most users only need StreamExt
not Stream
. I can easily imagin SO questions like "How can I map
or filter
on Stream
type?" and correct answer for it is to replace use futures::stream::Stream
with futures::stream::StreamExt
. Of course we can recommend to use futures::prelude::*
but some of them will complain about it as we all know the use-all pattern is considered bad in general.
That's why I'm suggesting here to remove suffix from consumer-side traits. The Core
suffix I referred in title needs more bikeshedding though.
This issue is more like a RFC but I couldn't find a better place for it. Please let me know if this is not a right place for it!