api: add missing doc-comment description for api enums
this is used as description in the api schema Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> (cherry picked from commit 2d4209d9ef468a44e462905d609f07b7ca39ce84)
This commit is contained in:
parent
abe16cd144
commit
0d912d6643
@ -200,6 +200,7 @@ pub fn read_user(userid: Userid, rpcenv: &mut dyn RpcEnvironment) -> Result<User
|
||||
#[api()]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
/// The set of properties that can be deleted from a user configuration.
|
||||
pub enum DeletableProperty {
|
||||
/// Delete the comment property.
|
||||
Comment,
|
||||
|
@ -641,6 +641,7 @@ fn get_file_system_devices(lsblk_info: &[LsblkInfo]) -> Result<HashSet<u64>, Err
|
||||
#[api()]
|
||||
#[derive(Debug, Serialize, Deserialize, Eq, PartialEq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
/// What a block device partition is used for.
|
||||
pub enum PartitionUsageType {
|
||||
/// Partition is not used (as far we can tell)
|
||||
Unused,
|
||||
@ -661,6 +662,7 @@ pub enum PartitionUsageType {
|
||||
#[api()]
|
||||
#[derive(Debug, Serialize, Deserialize, Eq, PartialEq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
/// What a block device (disk) is used for.
|
||||
pub enum DiskUsageType {
|
||||
/// Disk is not used (as far we can tell)
|
||||
Unused,
|
||||
@ -1220,6 +1222,7 @@ pub fn create_single_linux_partition(disk: &Disk) -> Result<Disk, Error> {
|
||||
#[api()]
|
||||
#[derive(Debug, Copy, Clone, Serialize, Deserialize, Eq, PartialEq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
/// A file system type supported by our tooling.
|
||||
pub enum FileSystemType {
|
||||
/// Linux Ext4
|
||||
Ext4,
|
||||
@ -1233,7 +1236,7 @@ impl std::fmt::Display for FileSystemType {
|
||||
FileSystemType::Ext4 => "ext4",
|
||||
FileSystemType::Xfs => "xfs",
|
||||
};
|
||||
write!(f, "{}", text)
|
||||
write!(f, "{text}")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user