Skip to main content

Crate nestrs_core

Crate nestrs_core 

Source

Structs§

AuthError
Error produced by AuthStrategy::validate.
AxumHttpEngine
Default engine: Axum Router.
ConfigurableModuleBuilder
Convenience builder for NestJS-like configurable modules (for_root, for_root_async).
DiscoveryService
NestJS DiscoveryService analogue: introspect registered providers and compiled HTTP routes.
DynamicModule
Runtime-composed module unit for conditional imports (feature flags, env switches, plugins).
DynamicModuleBuilder
Builds a DynamicModule from a static module graph, optionally applying provider overrides before controllers are registered (useful for configurable modules and testing-like setups).
ExecutionContext
Cross-cutting context similar to NestJS ExecutionContext / ArgumentsHost for HTTP handlers (RPC/WS can set HostType when wired manually).
HandlerKey
Per-request handle identifying the matched handler (used for metadata lookups).
HttpExecutionArguments
NestJS switchToHttp().getRequest()-style view without storing the full Axum request type.
MetadataRegistry
Global metadata helpers (handler key + metadata key/value).
ModuleOptions
Typed runtime options token for configurable modules.
ModuleRef
NestJS ModuleRef analogue: typed access to the root ProviderRegistry after the application graph is built.
OpenApiResponseDesc
One HTTP response line for OpenAPI generation (per route).
OpenApiRouteSpec
Optional per-route OpenAPI metadata (from #[openapi(...)] / impl_routes! openapi clause).
ProviderRegistry
RouteInfo
RouteRegistry
Global route registry (used by OpenAPI generation and diagnostics).

Enums§

GuardError
Failure returned from CanActivate::can_activate; becomes a JSON error body (401 / 403).
HostType
Active host kind (NestJS ArgumentsHost#getType).
ProviderScope
Provider lifetime semantics (NestJS Scope.DEFAULT / Scope.TRANSIENT / Scope.REQUEST analogues).

Traits§

AuthStrategy
Auth strategy contract similar to Nest’s Passport strategy adapters.
CanActivate
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.
Controller
DatabasePing
Minimal health / connectivity check shared by SQL, Prisma, Mongo, and custom drivers.
HttpServerEngine
Pluggable HTTP engine (NestJS “platform agnostic” idea). Only AxumHttpEngine is implemented today.
Injectable
Application service or provider type constructed through the DI container.
Module
ModuleGraph
Testing-oriented module traversal API.
PipeTransform
Transform one value into another, possibly failing (validation / coercion).

Functions§

with_request_scope
Runs future with an empty request-scoped provider cache (used by request middleware).