Function iced::subscription::unfold
pub fn unfold<I, T, Fut, Message>(
id: I,
initial: T,
f: impl FnMut(T) -> Fut + MaybeSend + Sync + 'static
) -> Subscription<Message>where
I: Hash + 'static,
T: MaybeSend + 'static,
Fut: Future<Output = (Message, T)> + MaybeSend + 'static,
Message: 'static + MaybeSend,
Expand description
Returns a Subscription
that will create and asynchronously run a
Stream
that will call the provided closure to produce every Message
.
The id
will be used to uniquely identify the Subscription
.