pub async fn with_propagated_context<F, R>(ctx: &ActorContext, f: F) -> Rwhere
F: Future<Output = R>,👎Deprecated since 0.2.0:
ContextInboundInterceptor now restores context automatically via wrap_handler. Use this only for manual context restoration outside the interceptor pipeline.
Expand description
Run an async handler body with the propagated dcontext from actor headers.
Deprecated since dactor 0.3: The ContextInboundInterceptor
now implements wrap_handler which automatically restores context into the
handler’s async task-local scope. This function is no longer needed when
using the interceptor pipeline.
Retained for backward compatibility and for use cases outside the interceptor pipeline (e.g., manual context restoration in tests or one-off async blocks).
If no propagated context is found in the headers, the future runs without any dcontext scope (a no-op passthrough).