This is not a real problem that I have, but I was thinking on how similar functionality can be implemented in Rust. I have an application struct, which owns other subsystems, such as the Executor. I want to be able to push closures to the executor, which contain references to the application struct. Essentially I want to have my own scoped closures, similar to scoped threads in std. As in the following example. What are the safe ways to implement this? I want the App to specifically not be wr...