Expand description
Axum middleware to rewrite a request such that a version prefix, e.g. "/v0"
, is added to the
path.
Structs§
- All
- ApiVersionFilter making all requests be rewritten.
- ApiVersion
Layer - Axum middleware to rewrite a request such that a version prefix is added to the path. This is
based on a set of API versions and an optional
"x-api-version"
custom HTTP header: if no such header is present, the highest version is used. Yet this only applies to requests the URIs of which pass a filter; others are not rewritten. - ApiVersion
Service - See ApiVersionLayer.
- ApiVersions
- API versions; a validated newtype for a
u16
array. - XApi
Version - Custom HTTP header conveying the API version, which is expected to be a version designator
starting with
'v'
followed by a number within0u16..10_000
without leading zero, e.g.v0
.
Statics§
- X_
API_ VERSION - Header name for the XApiVersion custom HTTP header.
Traits§
- ApiVersion
Filter - Filter to determine which requests are rewritten.