api2/types: add TaskStateType struct
the same as the regular TaskState, but without its fields, so that we can use the api macro and use it as api call parameter Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
a92b2d6a00
commit
5976c392ad
@ -662,6 +662,20 @@ impl From<crate::server::TaskListInfo> for TaskListItem {
|
||||
}
|
||||
}
|
||||
|
||||
#[api()]
|
||||
#[derive(Eq, PartialEq, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum TaskStateType {
|
||||
/// Ok
|
||||
OK,
|
||||
/// Warning
|
||||
Warning,
|
||||
/// Error
|
||||
Error,
|
||||
/// Unknown
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[api()]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
|
Loading…
Reference in New Issue
Block a user