pub fn listen_with<Message>(
f: fn(Event, Status, Id) -> Option<Message>,
) -> Subscription<Message>where
Message: 'static + MaybeSend,Expand description
Creates a Subscription that listens and filters all the runtime events
with the provided function, producing messages accordingly.
This subscription will call the provided function for every [Event]
handled by the runtime. If the function:
- Returns
None, the [Event] will be discarded. - Returns
Somemessage, theMessagewill be produced.