Skip to content

Commit

Permalink
Merge pull request #13 from dmitry-erin/enum-fix
Browse files Browse the repository at this point in the history
u8 values for enums VMStatus and TrustLevel
  • Loading branch information
mbssrc authored Sep 4, 2024
2 parents f7d40a9 + f374e1b commit 65e38b9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions common/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ use serde::Serialize;
use strum::{Display, EnumString};

#[derive(Clone, Copy, Debug, Default, Serialize, EnumString, Display)]
#[repr(u8)]
pub enum VMStatus {
#[default]
Running,
PoweredOff,
Paused,
Running = 0,
PoweredOff = 1,
Paused = 2,
}

#[derive(Clone, Copy, Debug, Default, Serialize, EnumString, Display)]
#[repr(u8)]
pub enum TrustLevel {
Secure,
Secure = 0,
#[default]
Warning,
NotSecure,
Warning = 1,
NotSecure = 2,
}

#[derive(Debug, Clone, Serialize)]
Expand Down

0 comments on commit 65e38b9

Please sign in to comment.