Is your feature request related to a problem? Please describe.
The StreamExt trait provides the helpful method take, map, and the like on Streams. But the structures themselves (Take, Map, etc.) are not visible outside the crate, as they are not pub use in stream_ext.rs.
Describe the solution you'd like
Making those types public.
Their equivalents in std::iter, std::io and tokio::io are public, and the generator structures Once, Empty, Iter, etc. in tokio-stream are public as well.
Describe alternatives you've considered
As mentionned here by @Darksonn, it could be kept private to be able to
use impl Trait as the return value in the extension trait without a breaking change.
Is your feature request related to a problem? Please describe.
The
StreamExt
trait provides the helpful methodtake
,map
, and the like onStream
s. But the structures themselves (Take
,Map
, etc.) are not visible outside the crate, as they are notpub use
instream_ext.rs
.Describe the solution you'd like
Making those types public. Their equivalents in
std::iter
,std::io
andtokio::io
are public, and the generator structuresOnce
,Empty
,Iter
, etc. in tokio-stream are public as well.Describe alternatives you've considered
As mentionned here by @Darksonn, it could be kept private to be able to
Additional context
Original discussion here : https://github.com/tokio-rs/tokio/discussions/6655#discussioncomment-9868556
I am playing around with tonic, and need to name the type of the Stream I use to implement a Server Streaming RPC. So :
and I can't import Take.