Question: Is there no way to put statically defined named functions with all of them having the same signature in a collection type without using &dyn Fn or Box<dyn Fn>? My guess is no just want to make sure
When I say "box everything", I'm including the future itself. e.g. `Box::new(|args| async_fn(args).map(|f| f.boxed()))`
-
-
Which would let you have `Vec<Box<dyn Fn(Args) -> Pin<Box<dyn Future<Output = Whatever>>>>>`
-
yea, but at that point you don't need to box the function anymore. You can just get a `fn(Args) -> Pin<Box<dyn Future<Output = Whatever>>>` for each element in the `Vec`
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.