actix-default-responder

Crates.ioactix-default-responder
lib.rsactix-default-responder
version0.1.0
sourcesrc
created_at2022-07-24 14:45:26.795868
updated_at2022-07-24 14:45:26.795868
descriptionProcedural macro for generating default `Responder` implementation for a specific data type (ie. json, xml, etc).
homepage
repositoryhttps://github.com/jsam/actix-default-responder
max_upload_size
id632031
size5,076
sam (jsam)

documentation

README

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,
}
Commit count: 6

cargo fmt