[−][src]Macro bastion::run
This macro blocks the current thread until passed future is resolved with an output (including the panic).
Example
let future1 = async move { 123 }; run! { let result = future1.await; assert_eq!(result, 123); }; let future2 = async move { 10 / 2 }; let result = run!(future2); assert_eq!(result, 5);