cloud_hypervisor_client/models/
lock_granularity.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum LockGranularity {
17 #[serde(rename = "ByteRange")]
18 ByteRange,
19 #[serde(rename = "Full")]
20 Full,
21}
22
23impl std::fmt::Display for LockGranularity {
24 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
25 match self {
26 Self::ByteRange => write!(f, "ByteRange"),
27 Self::Full => write!(f, "Full"),
28 }
29 }
30}
31
32impl Default for LockGranularity {
33 fn default() -> LockGranularity {
34 Self::ByteRange
35 }
36}