pub async fn collect_ready_async<C, S>(stream: S) -> C
where C: Default + Extend<S::Item>, S: Stream,
Expand description

Collects the immediately available items from the Stream into a collection (Default + Extend).

This consumes the stream, use [futures::StreamExt::by_ref()] (or just &mut ...) if you want to retain ownership of your stream.