Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Task From Stream

Imagine you want a Task that produces more than one Message. One solution is to use Task::run and pass a Stream to it.

A Stream is basically an async iterator.

To create a Stream we can use iced::stream::channel. With that function, we can convert a Future to a Stream. In the Future we can emit messages via a given Sender.