Skip to main content

Module axum

Module axum 

Source
Expand description

Axum HTTP/JSON API handlers

Modulesยง

routes
Route constants and URL builders for Axum HTTP API

Structsยง

ErrorResponse ๐Ÿ”’
API error response
SendQuery ๐Ÿ”’

Functionsยง

classify_availability_error ๐Ÿ”’
Classify an anyhow::Error from an availability handler into the appropriate ApiError variant. Errors produced via AvailabilityError in the state implementation carry semantic meaning; everything else falls back to a 500 Internal Server Error.
create_combined_router
Create a combined router serving both v1 and v2 APIs
create_router_v1
Create v1 router without OpenAPI documentation (internal types)
create_router_v2
Create v2 router with OpenAPI documentation (proto types)
drive_ws_stream ๐Ÿ”’
redirect_to_docs ๐Ÿ”’
Redirect handler for root path
rewrite_root_to_v2 ๐Ÿ”’
Middleware to rewrite root paths to /v2 paths
serve_openapi_spec ๐Ÿ”’
Serve the OpenAPI spec (extracted from Extension)
serve_swagger_ui ๐Ÿ”’
Serve custom Swagger UI with collapsed defaults