Skip to main content

cloud_hypervisor_client/models/
lock_granularity.rs

1/*
2 * Cloud Hypervisor API
3 *
4 * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
5 *
6 * The version of the OpenAPI document: 0.3.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14///
15#[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}