summaryrefslogtreecommitdiffstats
path: root/tokio/src/stream/mod.rs
AgeCommit message (Collapse)Author
2020-11-11stream: add docs regarding futures' StreamExt (#3128)Alice Ryhl
2020-10-12rt: Remove `threaded_scheduler()` and `basic_scheduler()` (#2876)Lucio Franco
Co-authored-by: Alice Ryhl <alice@ryhl.io> Co-authored-by: Carl Lerche <me@carllerche.com>
2020-10-05io, stream: make ext trait futures !Unpin (#2910)Taiki Endo
Make these future `!Unpin` for compatibility with async trait methods.
2020-10-01time: introduce `sleep` and `sleep_until` functions (#2826)Juan Alvarez
2020-09-24sync: support mpsc send with `&self` (#2861)Carl Lerche
Updates the mpsc channel to use the intrusive waker based sempahore. This enables using `Sender` with `&self`. Instead of using `Sender::poll_ready` to ensure capacity and updating the `Sender` state, `async fn Sender::reserve()` is added. This function returns a `Permit` value representing the reserved capacity. Fixes: #2637 Refs: #2718 (intrusive waiters)
2020-09-24docs: use #[doc(no_inline)] on re-exports (#2874)Taiki Endo
2020-09-09stream: module level docs for tokio::stream (#2786)xd009642
2020-09-02time: move throttle to StreamExt (#2752)Blas Rodriguez Irizar
Ref: #2727
2020-07-13doc: fix typo from "Rust langague" to "Rust language" (#2656)Antoine Murat
* doc: fix typo in addr * doc: fix typo in stream * doc: fix typo in stream/collect
2020-05-21stream: update StreamExt::merge doc (#2520)Alice Ryhl
2020-05-10stream: fix documentation on filter_map (#2511)Tom Ciborski
2020-04-23stream: fix panic in Merge and Chain size_hint (#2430)Mikail Bagishov
2020-02-02stream: add StreamExt::skip_while (#2205)Tore Pettersen
async version of Iterator::skip_while Refs: #2104
2020-02-01stream: add StreamExt::skip (#2204)Tore Pettersen
skip version of take Refs: #2104
2020-01-31stream: provide `StreamMap` utility (#2185)Carl Lerche
`StreamMap` is similar to `StreamExt::merge` in that it combines source streams into a single merged stream that yields values in the order that they arrive from the source streams. However, `StreamMap` has a lot more flexibility in usage patterns. `StreamMap` can: - Merge an arbitrary number of streams. - Track which source stream the value was received from. - Handle inserting and removing streams from the set of managed streams at any point during iteration. All source streams held by `StreamMap` are indexed using a key. This key is included with the value when a source stream yields a value. The key is also used to remove the stream from the `StreamMap` before the stream has completed streaming. Because the `StreamMap` API moves streams during runtime, both streams and keys must be `Unpin`. In order to insert a `!Unpin` stream into a `StreamMap`, use `pin!` to pin the stream to the stack or `Box::pin` to pin the stream in the heap.
2020-01-24stream: add StreamExt::timeout() (#2149)Juan Alvarez
2020-01-23stream: add `StreamExt::fold()` (#2122)Artem Vorotnikov
2020-01-13stream: add `StreamExt::collect()` (#2109)Carl Lerche
Provides an asynchronous equivalent to `Iterator::collect()`. A sealed `FromStream` trait is added. Stabilization is pending Rust supporting `async` trait fns.
2020-01-11stream: add `StreamExt::chain` (#2093)Carl Lerche
Asynchronous equivalent to `Iterator::chain`.
2020-01-11stream: add stream::once (#2094)Carl Lerche
An async equivalent to `iter::once`
2020-01-11stream: add `empty()` and `pending()` (#2092)Carl Lerche
`stream::empty()` is the asynchronous equivalent to `std::iter::empty()`. `pending()` provides a stream that never becomes ready.
2020-01-11stream: add `StreamExt::merge` (#2091)Carl Lerche
Provides an equivalent to stream `select()` from futures-rs. `merge` best describes the operation (vs. `select`). `futures-rs` named the operation "select" for historical reasons and did not rename it back to `merge` in 0.3. The operation is most commonly named `merge` else where as well (e.g. ReactiveX).
2020-01-09stream: add `StreamExt::fuse` (#2085)Carl Lerche
2020-01-07docs: minor tweaks to `StreamExt` API docs (#2066)Carl Lerche
2020-01-06stream: Add StreamExt::any (#2034)Artem Vorotnikov
2020-01-02stream: correct trait bounds for all (#2043)Artem Vorotnikov
2020-01-02stream: add StreamExt::all (#2035)Artem Vorotnikov
2019-12-25stream: add StreamExt::take_while (#2029)Artem Vorotnikov
2019-12-24stream: add StreamExt::take (#2025)Artem Vorotnikov
2019-12-20stream: StreamExt::try_next (#2005)Artem Vorotnikov
2019-12-20stream: filtering utilities (#2001)Artem Vorotnikov
Adds `StreamExt::filter` and `StreamExt::filter_map`.
2019-12-20chore: formatting, docs and clippy (#2000)Artem Vorotnikov
2019-12-18stream: add `next` and `map` utility fn (#1962)Artem Vorotnikov
Introduces `StreamExt` trait. This trait will be used to add utility functions to make working with streams easier. This patch includes two functions: * `next`: a future returning the item in the stream. * `map`: transform each item in the stream.