Expand description
Typed, composable HTTP error sets for Axum.
§Overview
- All status-codes are defined in
codes. ApiResponsecan be used as the return/error type in anaxumhandlers.ApiResponse<Tuple>can be used to specify multiple type-safe response types for anaxumhandler.- Provides convenient methods for error propagation through
ResultStatusExt. - Supports automatic openapi generation through
aideor [utoipa].
Modules§
- codes
- Defines all HTTP status code wrappers.
Structs§
- ApiResponse
- A response that may be returned from an
axumhandler, with a flexible set of response types.
Traits§
- ApiResult
Ext - Extension trait for
Resulttypes withApiResponseerrors, providing a method to convert the error type into a superset error type. - Result
Status Ext - Extension trait for
Resultthat provides methods to wrap errors with specific HTTP status codes. - Status
Provider - A
StatusCodethat wraps an inner value, and can thus be used for easy error propagation while keeping track of the status-code in the type-system.
Type Aliases§
- ApiResult
- A convenient alias for a
Resulttype where the error is anApiResponse.