Description
Summary
In the context of the Async Foundations group, @nellshamrell has been drafting an RFC to stabilize the Stream
trait. See e.g. rust-lang/wg-async#15 for the latest round of edits. While the actual content of the RFC is perhaps more libs than lang (introducing a trait), the choice of whether or not to introduce this trait touches on a number of lang issues, particularly around forwards compatibility, and I thought it would be good to discuss as a group.
Some of the issues I thought particularly relevant:
- Method dispatch ambiguity issues around migrating extension methods from futures crate to the stdlib (a common scenario that also applies to e.g. itertools for iterators)
- Coherence issues if we attempted to bridge a
Stream
trait with a futureLendingStream
(a.k.a., "streaming stream" or "attached stream") trait - The possibility of generator syntax and potential compatibility issues that may arise there
cc @rust-lang/wg-async-foundations @sfackler
Background reading
Draft RFC: rust-lang/wg-async#15
About this issue
This issue corresponds to a lang-team design meeting proposal. It corresponds
to a possible topic of discussion that may be scheduled for deeper discussion
during one of our design meetings.