Function nagiosplugin::safe_run_with_state [−][src]
pub async fn safe_run_with_state<F>(future: F, error_state: State) where
F: Future<Output = Result<(), Box<dyn Error>>>,
Runs the given closure and exits with the given State after printing out the error message if the Result contains an Err.