proxmox/proxmox-api-macro/tests
Wolfgang Bumiller f5d15872f4 api-macro: add api_get_default!() macro
When writing an #[api] function, one can now access default
values by parameter name (see test_default_option in
tests/options.rs):

    #[api(...)]
    pub fn func(value: Option<isize>) {
        println!(
            "value: {}",
            value.unwrap_or(api_get_default!("value")),
        );
    }

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-03-19 15:49:34 +01:00
..
api1.rs api-macro: more tests 2020-01-08 10:58:27 +01:00
api2.rs api-macro: include default minimum/maximum for integer types 2020-03-06 11:59:08 +01:00
ext-schema.rs api-macro: add expanded data to tests for verification 2020-01-08 10:51:00 +01:00
int-limits.rs api-macro: add integer limit test cases 2020-03-06 12:02:32 +01:00
options.rs api-macro: add api_get_default!() macro 2020-03-19 15:49:34 +01:00
types.rs fix property sorting 2020-01-23 13:15:59 +01:00