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 | No |
attachment | Enables the Attachment response | No |
cached | Enables the Cached extractor | No |
cookie | Enables the CookieJar extractor | No |
cookie-private | Enables the PrivateCookieJar extractor | No |
cookie-signed | Enables the SignedCookieJar extractor | No |
cookie-key-expansion | Enables the Key::derive_from method | No |
erased-json | Enables the ErasedJson response | No |
error-response | Enables the InternalServerError response | No |
form | Enables the Form extractor | No |
handler | Enables the handler utilities | No |
json-deserializer | Enables the JsonDeserializer extractor | No |
json-lines | Enables the JsonLines extractor and response | No |
middleware | Enables the middleware utilities | No |
multipart | Enables the Multipart extractor | No |
optional-path | Enables the OptionalPath extractor | No |
protobuf | Enables the Protobuf extractor and response | No |
query | Enables the Query extractor | No |
routing | Enables the routing utilities | No |
tracing | Log rejections from built-in extractors | Yes |
typed-routing | Enables the TypedPath routing utilities | No |
typed-header | Enables the TypedHeader extractor and response | No |
file-stream | Enables the FileStream response | No |
with-rejection | Enables the WithRejection extractor | No |
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.