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