I would love to use this little function like I have been using tokio::runtime::Runtime::new().unwrap().block_on, which will return the result of the future so that I can easily move on with the value returned.
I am not sure how to achieve that with executor. I've been declaring a variable outside of the future closure and trying to mutate it from within the closure, so that I can use the value once the future has completed. It's not working out so well. What can be done?
I would love to use this little function like I have been using
tokio::runtime::Runtime::new().unwrap().block_on, which will return the result of the future so that I can easily move on with the value returned.I am not sure how to achieve that with
executor. I've been declaring a variable outside of the future closure and trying to mutate it from within the closure, so that I can use the value once the future has completed. It's not working out so well. What can be done?