dial9-macro 0.3.0

Proc-macro crate that provides the dial9_tokio_telemetry::main attribute macro
Documentation
---
source: dial9-macro/src/lib.rs
expression: output
---
fn main() {
    let (__tokio_runtime, __maybe_guard) = my_config()
        .build()
        .expect("failed to initialize runtime");
    if let Some(__dial9_guard) = __maybe_guard {
        let __dial9_handle = __dial9_guard.handle();
        __tokio_runtime
            .block_on(async move {
                match __dial9_handle
                    .spawn(async move {
                        do_work().await;
                    })
                    .await
                {
                    Ok(output) => output,
                    Err(err) if err.is_panic() => {
                        ::std::panic::resume_unwind(err.into_panic())
                    }
                    Err(_) => unreachable!("task cannot be cancelled inside block_on"),
                }
            })
    } else {
        __tokio_runtime
            .block_on(async move {
                do_work().await;
            })
    }
}