Crates.io | actix-default-responder |
lib.rs | actix-default-responder |
version | 0.1.0 |
source | src |
created_at | 2022-07-24 14:45:26.795868 |
updated_at | 2022-07-24 14:45:26.795868 |
description | Procedural macro for generating default `Responder` implementation for a specific data type (ie. json, xml, etc). |
homepage | |
repository | https://github.com/jsam/actix-default-responder |
max_upload_size | |
id | 632031 |
size | 5,076 |
Procedural macros for generating default actix_web::Responder
implementation for a custom serialization.
Currently supported formats are:
1. JSON
2. Bincode
3. XML
#[derive(Serialize, PartialEq, JsonResponder)]
struct JsonResponse {
name: String,
}
#[derive(Debug, Serialize, PartialEq, XMLResponder)]
struct XMLResponse {
name: String,
}
#[derive(Debug, Serialize, PartialEq, BincodeResponder)]
struct BincodeResponse {
name: String,
}