mirror of
https://git.proxmox.com/git/proxmox
synced 2025-11-29 02:06:02 +00:00
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>
|
||
|---|---|---|
| .. | ||
| debian | ||
| src | ||
| tests | ||
| Cargo.toml | ||