pub async fn with_context<F, T>(context: Context, f: F) -> Twhere F: Future<Output = T>,
Attaches a context for the duration of the async function.
let context = extract_from_headers(&headers); with_context(context, async { // This async block runs with the extracted context process_event().await; }).await;