diff --git a/src/eol_cmd.rs b/src/eol_cmd.rs new file mode 100644 index 0000000..f7c8697 --- /dev/null +++ b/src/eol_cmd.rs @@ -0,0 +1,22 @@ +use std::fmt; + +/// End of life command +/// - Trash - move the message to the trash to be automatically deleted by Google +/// - Delete - delete the message immediately without allowing rescue from trash +#[derive(Debug, Default)] +pub enum EolCmd { + #[default] + /// Move the message to the trash + Trash, + /// Delete the message immediatly + Delete, +} + +impl fmt::Display for EolCmd { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + EolCmd::Trash => write!(f, "trash"), + EolCmd::Delete => write!(f, "delete"), + } + } +}