proxmox/proxmox-api-macro
Wolfgang Bumiller 176e208caf api-macro: add consts for defaults
Not sure how we want to actually handle default values yet.
For now we need to figure out what "feels best".
This adds default values as publicly available consts so
they can be accessed from anywhere as
`API_METHOD_<METHOD_NAME>_PARAM_DEFAULT_<PARAM_NAME>`.
This is quite a handful to type, but I'm not sure how to
make this better.

Within the function body we also have the
`api_get_default!(param_name)` macro which is more
convenient, but not available outside the `#[api]` tagged
function.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-03-23 09:15:54 +01:00
..
debian bump api-macro to 0.1.5 2020-03-19 09:58:02 +01:00
src api-macro: add consts for defaults 2020-03-23 09:15:54 +01:00
tests api-macro: add api_get_default!() macro 2020-03-19 15:49:34 +01:00
Cargo.toml api-macro: explicitly enable syn's visit-mut feature 2020-03-23 08:04:26 +01:00