Function non_blocking

Source
pub fn non_blocking<F, R>(future: F) -> Result<R>
where F: Future<Output = R>,
Expand description

Attempt to resolve a future without blocking. Return WouldBlock error if the future will block. Return the resolved value otherwise.