jder_axum

Crates.iojder_axum
lib.rsjder_axum
version0.9.0
created_at2024-10-04 19:07:51.224552+00
updated_at2025-09-20 10:13:32.55781+00
descriptionA response builder for axum
homepagehttps://github.com/jderstd/axum
repositoryhttps://github.com/jderstd/axum
max_upload_size
id1396987
size126,802
Alpheus (alpheusmtx)

documentation

README

JDER axum

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.

Quick Start

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": []
}

License

This project is licensed under the terms of the MIT license.

Commit count: 120

cargo fmt