#actix-web #json-xml #xml #json #actix #proc-macro #generate

macro actix-default-responder

Procedural macro for generating default Responder implementation for a specific data type (ie. json, xml, etc).

1 unstable release

0.1.0 Jul 24, 2022

#1463 in Procedural macros

Download history 3579/week @ 2024-07-20 2626/week @ 2024-07-27 4015/week @ 2024-08-03 4838/week @ 2024-08-10 2763/week @ 2024-08-17 1080/week @ 2024-08-24 2244/week @ 2024-08-31 3105/week @ 2024-09-07 3724/week @ 2024-09-14 2815/week @ 2024-09-21 2840/week @ 2024-09-28 1552/week @ 2024-10-05 3283/week @ 2024-10-12 4124/week @ 2024-10-19 3407/week @ 2024-10-26 4019/week @ 2024-11-02

14,942 downloads per month

MIT/Apache

6KB
63 lines

Actix Default Responder

Procedural macros for generating default actix_web::Responder implementation for a custom serialization.

Currently supported formats are:

1. JSON

2. Bincode

3. XML

Json Response

#[derive(Serialize, PartialEq, JsonResponder)]
struct JsonResponse {
    name: String,
}

XML Response

#[derive(Debug, Serialize, PartialEq, XMLResponder)]
struct XMLResponse {
    name: String,
}

Bincode Response

#[derive(Debug, Serialize, PartialEq, BincodeResponder)]
struct BincodeResponse {
    name: String,
}

Dependencies

~1.5MB
~37K SLoC