pub fn get_invocation_context() -> Option<InvocationContext>Expand description
Get the current invocation context, if running inside a task.
Resolution order:
- tokio
INVOCATION_CTXtask_local (async task execution path) std::thread_localfallback (spawn_blocking / rayon path)
Returns None when called outside a runner-managed task execution
(e.g. from a test or from top-level application code).