Skip to main content

run

Function run 

pub async fn run<R, F>(op: F) -> Result<R, Error>
where F: FnOnce() -> Result<R, Error> + Send + 'static, R: Send + 'static,
Expand description

Run op on an I/O thread and await its result.

§Errors

op’s error, or an error when the I/O pool is unavailable.