aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/planet.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/planet.rs b/src/planet.rs
index b2aa221..210de5a 100644
--- a/src/planet.rs
+++ b/src/planet.rs
@@ -1,4 +1,4 @@
-use std::{convert::TryFrom, sync::Arc};
+use std::{convert::TryFrom, sync::Arc, fmt::Display};
use virt::{domain::{Domain, DomainState}};
use serde::{Serialize, Deserialize};
@@ -169,6 +169,12 @@ pub enum Health {
GuestSuspended = 7
}
+impl Display for Health {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{:?}", self)
+ }
+}
+
impl TryFrom<u32> for Health {
type Error = Error;
fn try_from(value: u32) -> Result<Self, Self::Error> {