An attribute macro to transform
a handler response struct to an actix responder
.
Keeps flexibility while adding more type safety.
``` //the meta_attr allows for arbitrary copy paste to the meta field //the macro is adding to the struct
struct SuccessResp { success: bool, } ```
From this
```
pub async fn health_check() -> impl Responder {
HttpResponse::Ok()
.set_header(header::CONTENT_TYPE, mime::APPLICATION_JSON)
.json(SuccessResp { success: true })
}
```
to this
```
pub async fn health_check() -> SuccessResp {
SuccessResp::builder().success(true).build()
}
```