run

Function run 

Source
pub fn run<T, E>(
    future: impl Future<Output = Result<T, E>> + Send + 'static,
) -> !
where T: Send + 'static, E: Display + Send + 'static,
Expand description

Starts a task from the given future, waits for it to stop, then exits the process.

If the task fails, this function logs the error and exits the process with a non-zero exit code.