I experimented with higher order async functions in Rust and can't figure out how I can communicate to the compiler that
foo outlives the future execution. Or does it at all?
If I declare foo outside of
applier(), I can bind the lifetimes of the mutable borrow of
foo and the future to each other and it compiles. See this example: Playground
My question is: How can I declare
foo inside of
applier without running in lifetime issues?
Thanks in advance!