Skip to main content

Module dispatch_runtime

Module dispatch_runtime 

Source
Expand description

Host-level DI handles: the service provider and the handler registry.

Since 1.0 rust-webx passes DI explicitly instead of relying on a task-local ambient runtime:

  • Mediator holds the provider and the handler registry it was built with;
  • IHttpContext exposes the DispatchRuntime that dispatched the request, so endpoint adapters and middleware can open scopes (provider.scope()) explicitly;
  • background work injects rust-dix’s built-in Arc<dyn ScopeFactory> and calls ScopeFactory::create_scope() itself.

Host stores one DispatchRuntime per instance. There is no process-wide or task-local fallback: rust-dix owns scope lifetime, resolution and disposal, and rust-webx only keeps the per-host handle.

Structs§

DispatchRuntime
Provider + handler registry for one host instance.