#axum #macro #derive #response #proc-macro #error-response #string

immortal_axum_macro

为 Axum IntoResponse 特性提供的简单 derive 到响应的宏

3 个版本 (重大更改)

0.3.0 2024 年 6 月 15 日
0.2.0 2024 年 6 月 15 日
0.1.0 2024 年 4 月 11 日

29#error-response 中排名

Download history 6/week @ 2024-05-19 2/week @ 2024-06-02 171/week @ 2024-06-09 84/week @ 2024-06-16 2/week @ 2024-06-23

每月下载量 111 次
immortal_axum_utils 中使用

MIT 许可证

4KB

为 Axum IntoResponse 特性提供的简单 proc 宏

#[derive(Serialize, Deserialize, IntoResponse, Debug)]
pub struct ErrorResponse {
    pub code: String,
    pub msg: String,
    pub errors: Vec<ErrorResponse>,
}

依赖项

~1.5MB
~36K SLoC