pub trait HealthFutureExt<T>where
Self: Future<Output = T> + 'static,
T: 'static,{
// Required method
fn block(self) -> T;
}
Block on the provided future and return the result.
future
- The future to run.
Returns the return value of the future.
use libhealth::utils::prelude::*;
assert_eq!(async { 25 }.block(), 25);