Crates.io | lucia-macros |
lib.rs | lucia-macros |
version | 0.2.0 |
source | src |
created_at | 2022-11-28 20:51:57.527014 |
updated_at | 2022-12-19 00:30:22.880604 |
description | Procedural macros for lucia |
homepage | |
repository | https://github.com/c410-f3r/lucia |
max_upload_size | |
id | 724757 |
size | 102,546 |
Convenient macros that enable the fast creation of arbitrary endpoints based on the lucia
framework.
#[lucia::pkg(api(MyApi), data_format(json_rpc("my_endpoint")), transport(http))]
mod my_endpoint {
#[derive(Debug, serde::Serialize)]
#[pkg::req_data]
pub struct MyEndpointReq<'any> {
pub foo: i64,
pub bar: &'any str,
}
#[derive(Debug, serde::Deserialize)]
#[pkg::res_data]
pub struct MyEndpointRes {
pub data: i32,
}
}