2 unstable releases

0.2.0 Dec 19, 2022
0.1.0 Nov 28, 2022

#978 in #api-client

Download history 2/week @ 2024-02-15 16/week @ 2024-02-22 10/week @ 2024-02-29 1/week @ 2024-03-07 2/week @ 2024-03-14 3/week @ 2024-03-21 30/week @ 2024-03-28 17/week @ 2024-04-04 1/week @ 2024-04-11 5/week @ 2024-04-18

53 downloads per month
Used in 2 crates

MIT license

91KB
2.5K SLoC

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,
  }
}

lib.rs:

Lucia - Macros

Dependencies

~1.5MB
~34K SLoC