devela::workTrait ExtFuture
Source pub trait ExtFuture: Future {
// Provided method
fn block_on(self) -> Self::Output
where Self: Sized { ... }
}
Expand description
Extension trait providing additional methods for Future
s.
Available on crate feature std
only.
Blocks the thread until the future is ready.
See also the future_block
function.
§Example
use devela::ExtFuture as _;
let future = async {};
let result = future.block_on();