Crates.io | jder_axum |
lib.rs | jder_axum |
version | 0.9.0 |
created_at | 2024-10-04 19:07:51.224552+00 |
updated_at | 2025-09-20 10:13:32.55781+00 |
description | A response builder for axum |
homepage | https://github.com/jderstd/axum |
repository | https://github.com/jderstd/axum |
max_upload_size | |
id | 1396987 |
size | 126,802 |
A response builder for axum.
This package includes different axum response builders, extractors and layers based on the JSON response structure specified in JSON Data Errors Response (JDER). With the builders and extractors provided, various kinds of responses can be created easily instead of sending plain text responses.
Create a JSON response for an axum route:
use jder_axum::response::{
Response,
json::CreateJsonResponse,
};
async fn route() -> Response {
CreateJsonResponse::dataless().send()
}
And the response will be shown as below:
{
"success": true,
"data": null,
"errors": []
}
This project is licensed under the terms of the MIT license.