timeout

Attribute Macro timeout 

Source
#[timeout]
Expand description

This macro wraps any async function and transforms it’s output T into anyhow::Result<T>, if the function doesn’t end before the timout it will rais an error The macro also supports creating a #[tracing::instrument] macro with all the params inside tracing(args) Example: #[timeout(10, tracing(skip(non_debug_input)))] #[timeout(12)]