Display impl fro item

This commit is contained in:
Franklin 2023-04-23 11:08:30 -04:00
parent 82589a4d4d
commit 48b4a10648
1 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,5 @@
use std::fmt::Display;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
@ -6,4 +8,14 @@ pub enum Item {
Project,
Unit,
Agent,
}
impl Display for Item {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Item::Project => write!(f, "Project"),
Item::Unit => write!(f, "Unit"),
Item::Agent => write!(f, "Agent"),
}
}
}