clientapi_pve/models/
pve_preallocation_enum.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum PvePreallocationEnum {
17 #[serde(rename = "off")]
18 Off,
19 #[serde(rename = "metadata")]
20 Metadata,
21 #[serde(rename = "falloc")]
22 Falloc,
23 #[serde(rename = "full")]
24 Full,
25
26}
27
28impl std::fmt::Display for PvePreallocationEnum {
29 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
30 match self {
31 Self::Off => write!(f, "off"),
32 Self::Metadata => write!(f, "metadata"),
33 Self::Falloc => write!(f, "falloc"),
34 Self::Full => write!(f, "full"),
35 }
36 }
37}
38
39impl Default for PvePreallocationEnum {
40 fn default() -> PvePreallocationEnum {
41 Self::Off
42 }
43}
44