A snapshot of the live registries at a point in time. Cloned cheaply
via Arc so the admin handler can serve many requests without
re-reading the route registry under lock each time.
Builds a DynamicModule from a static module graph, optionally applying provider overrides
before controllers are registered (useful for configurable modules and testing-like setups).
Authorize the request before the handler runs. Declare per-route guard types in the impl_routes!
macro: GET "/x" with (A, B) => MyController::handler, — use with () when there are no route guards.
For a guard on all routes of a controller, use controller_guards (G) on impl_routes! (see the
nestrs crate); that runs outside route-level guards.
Marker trait for pipe types usable in HTTP #[use_pipes]. Adds the
Default bound the macro needs to instantiate each pipe at extraction
time without going through DI, and constrains Error to
std::error::Error so the per-arity extractors can box pipe errors and
downcast to HttpException (preserving the per-pipe status code).
Read the type-erased ability for the current task, if one was installed
via with_ability_erased (or via nestrs::policies::with_ability, which
writes to the same slot). Returns None outside of a scope.
Read the type-erased principal for the current task, if one was installed
via with_principal_erased (or via nestrs::policies::with_principal,
which writes to the same slot). Returns None outside of a scope.
Look up a value previously inserted into the request scope via
request_scope_insert or by the RequestScoped<T> provider. Returns
None outside of a request scope.
Spawns future on the ambient tokio runtime with the request scope
carried over — the supported way to run background work that resolves
Request-scoped providers.
Run future with the given type-erased ability installed in the per-task
ability slot. The caller is responsible for passing an Arc<Ability> (or
any other type they want to read back via current_ability_erased).
Run future with the given type-erased principal installed in the
per-task principal slot. The caller is responsible for passing an
Arc<policies::Principal> (or any other type they want to read back via
current_principal_erased).
Run future with the given trace context installed in the per-task
trace slot. Non-HTTP transports (WS gateways, message consumers, MCP
hosts) call this directly; the HTTP middleware does it per request.