Skip to main content

Module router

Module router 

Source
Expand description

API router configuration.

Structs§

CorsConfig
Cross-Origin Resource Sharing (CORS) configuration.
SecurityConfig
Security configuration for the server.
ServerConfig
Server configuration.

Enums§

RequiredCapability
The capability a route requires (Phase A spec §3).

Functions§

bind
Bind the API server’s port without starting to serve.
create_router
Create the API router with all routes configured.
create_router_with_state
Create the API router with custom state (no security).
create_secure_router
Create the API router with security enabled.
required_capability
Map a matched route (method + axum MatchedPath) to its required capability (spec §3 table).
serve
Start the API server.
serve_on
Serve on an already-bound listener.
serve_with_state
Start the API server with custom state.