After upgrading to latest dev I have problems converting my old subscription::channel
code to Subscription::run
I have a config struct that I need to pass. The examples (maybe I missed something?) do not show such an example.
How can I pass arguments to the builder function for Subscription::run?
I created a helper function and tried multiple things now but I am getting errors like
[...]
closures can only be coerced to `fn` types if they do not capture any variables
and I can’t seem to work around it
How would it work when the websocket example would have the server address as an argument here: iced/examples/websocket/src/echo.rs at master · iced-rs/iced · GitHub?
Like
pub fn connect(server_address: &str) -> impl Stream<Item = Event> {