lucia-macros

Crates.iolucia-macros
lib.rslucia-macros
version0.2.0
sourcesrc
created_at2022-11-28 20:51:57.527014
updated_at2022-12-19 00:30:22.880604
descriptionProcedural macros for lucia
homepage
repositoryhttps://github.com/c410-f3r/lucia
max_upload_size
id724757
size102,546
Caio (c410-f3r)

documentation

README

Lucia macros

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

cargo fmt