jder_axum

Crates.iojder_axum
lib.rsjder_axum
version
sourcesrc
created_at2024-10-04 19:07:51.224552+00
updated_at2025-01-09 12:24:06.101136+00
descriptionA response builder for axum
homepagehttps://github.com/alpheustangs/jder_axum
repositoryhttps://github.com/alpheustangs/jder_axum
max_upload_size
id1396987
Cargo.toml error:TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Alpheus (alpheustangs)

documentation

README

JDER axum

A response builder for axum.

This package includes several axum response builders and different extractors based on the JSON response structure specified in JSON Data Error 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,
    "error": null
}

License

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

Commit count: 51

cargo fmt