Expand description
Type scanning and automatic service registration logic.
In the rust-webx framework, “scanning” is achieved at compile time via:
#[rust_dix::module]+rust_dix::inject!— declare handlers in a module group#[endpoint](or shortcuts#[get],#[post],#[put],#[delete]) — register route metadata viainventory::submit!
This module provides the RouteEntry type that connects compile-time
macro output to runtime routing.
Structs§
- Handler
Cache - Runtime registry of compiled handler registrations.
- Handler
Entry - A single compiled handler entry in the registry.
- Handler
Registration - Handler registration collected at compile time.
Each
#[handler]annotation submits one of these to inventory. - Param
Meta - Metadata about a request parameter for OpenAPI generation.
- Response
Data - Response data produced by a dispatch function.
- Route
Dispatch - A dispatch function registered at compile time via the endpoint macros.
- Route
Entry - 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§
- Handler
Registry - Preferred name for
HandlerCache— emphasizes registry semantics over caching.