Skip to main content

Module scan

Module scan 

Source
Expand description

Type scanning and automatic service registration logic.

In the rust-webx framework, “scanning” is achieved at compile time via:

  1. #[rust_dix::module] + rust_dix::inject! — declare handlers in a module group
  2. #[endpoint] (or shortcuts #[get], #[post], #[put], #[delete]) — register route metadata via inventory::submit!

This module provides the RouteEntry type that connects compile-time macro output to runtime routing.

Structs§

HandlerCache
Runtime registry of compiled handler registrations.
HandlerEntry
A single compiled handler entry in the registry.
HandlerRegistration
Handler registration collected at compile time. Each #[handler] annotation submits one of these to inventory.
ParamMeta
Metadata about a request parameter for OpenAPI generation.
ResponseData
Response data produced by a dispatch function.
RouteDispatch
A dispatch function registered at compile time via the endpoint macros.
RouteEntry
A route entry registered at compile time via #[endpoint] (or its shortcuts #[get]/#[post]/…).

Functions§

global_provider
Get the global service provider. Used by #[handler] factories when the handler struct has #[inject_attr] for DI-based construction.
set_global_provider
Set the global service provider. Called once at Host::build() time.

Type Aliases§

HandlerRegistry
Preferred name for HandlerCache — emphasizes registry semantics over caching.