Available on crate feature
response only.Expand description
Provide useful response types.
With the i18n feature, response messages are translated automatically through the
request locale; with the response-json feature, JsonResponse serializes the
body as {"code": ..., "message": ..., "data": ...}. To define response codes in
YAML files and generate the corresponding enums, see
response_build.
Structs§
- Response
- Uniform response type with business code/message/data and i18n support.
- Response
Error - Error type for handlers returning
RspResult.
Traits§
- Response
Code Trait - Business code and message carried by a
Response.
Type Aliases§
- Json
Response response-json - Response
Builder Fn - RspResult
- Alias for a
ResultwithResponseErroras its error type.