Expand description
Extra utilities for axum.
§Feature flags
axum-extra uses a set of [feature flags] to reduce the amount of compiled and optional dependencies.
The following optional features are available:
| Name | Description | Default? |
|---|---|---|
async-read-body | Enables the AsyncReadBody body | |
attachment | Enables the Attachment response | |
cached | Enables the Cached extractor | |
cookie | Enables the CookieJar extractor | |
cookie-private | Enables the PrivateCookieJar extractor | |
cookie-signed | Enables the SignedCookieJar extractor | |
cookie-key-expansion | Enables the Key::derive_from method | |
erased-json | Enables the ErasedJson response | |
error-response | Enables the InternalServerError response | |
form | Enables the Form extractor | |
handler | Enables the handler utilities | |
json-deserializer | Enables the JsonDeserializer extractor | |
json-lines | Enables the JsonLines extractor and response | |
middleware | Enables the middleware utilities | |
multipart | Enables the Multipart extractor | |
optional-path | Enables the OptionalPath extractor | |
protobuf | Enables the Protobuf extractor and response | |
query | Enables the Query extractor | |
routing | Enables the routing utilities | |
tracing | Log rejections from built-in extractors | ✔ |
typed-routing | Enables the TypedPath routing utilities and the routing feature. | |
typed-header | Enables the TypedHeader extractor and response | |
file-stream | Enables the FileStream response | |
with-rejection | Enables the WithRejection extractor |
Re-exports§
pub use headers;typed-header
Modules§
- body
- Additional bodies.
- either
Either*types for combining extractors or responses into a single type.- extract
- Additional extractors.
- handler
handler - Additional handler utilities.
- json_
lines json-lines - Newline delimited JSON extractor and response.
- middleware
middleware - Additional middleware utilities.
- protobuf
protobuf - Protocol Buffer extractor and response.
- response
- Additional types for generating responses.
- routing
routing - Additional types for defining routes.
- typed_
header typed-header - Extractor and response for typed headers.
Macros§
- json
- Construct an
ErasedJsonresponse from a JSON literal. - vpath
- This macro aborts compilation if the path is invalid.
Structs§
- Typed
Header typed-header - Extractor and response that works with typed header values from
headers.