proxmox/proxmox-api-macro
Wolfgang Bumiller f340968773 macro: ability to rename enum variants via an attribute
In PVE we have multiple different enum types: hyphenated,
all-caps, underscores.

By default our api-macro enums will convert CamelCase to
underscores, so we need a way to represent the rest:

enum AnEnum {
	CaseOne, // becomes "case_one",
	#[api(rename = "case-two")]
	CaseTwo, // "case-two",
	#[api(rename = "CASE_THREE")]
	CaseThree,
}

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-07-18 14:52:25 +02:00
..
src macro: ability to rename enum variants via an attribute 2019-07-18 14:52:25 +02:00
tests api-server, tools: formatting cleanup 2019-07-18 10:47:56 +02:00
Cargo.toml fix missing proxmox_api -> proxmox::api replacement 2019-06-12 09:48:30 +02:00