Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 981 Bytes

README.md

File metadata and controls

41 lines (30 loc) · 981 Bytes

Actix Default Responder

Check Commit

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

Currently supported formats are:

  • JSON
  • Bincode
  • 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,
}