Attribute Macro lucia_macros::pkg
source · #[pkg]
Expand description
Package
A framework-like attribute placed in inline modules that creates all the mandatory elements
and optional elements related to lucia::pkg::Package
.
struct SomeApi;
#[lucia_macros::pkg(api(SomeApi), data_format(json_rpc("SomeEndpoint")))]
mod pkg {
#[pkg::req_data]
pub struct SomeEndpointReq<'string> {
ping: &'string str,
}
#[pkg::res_data]
pub struct SomeEndpointRes {
pong: String,
}
}