cull_gmail/eol_action.rs
1use std::fmt;
2
3/// End of life action
4/// - Trash - move the message to the trash to be automatically deleted by Google
5/// - Delete - delete the message immediately without allowing rescue from trash
6#[derive(Debug, Default)]
7pub enum EolAction {
8 #[default]
9 /// Move the message to the trash
10 Trash,
11 /// Delete the message immediately
12 Delete,
13}
14
15impl fmt::Display for EolAction {
16 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17 match self {
18 EolAction::Trash => write!(f, "trash"),
19 EolAction::Delete => write!(f, "delete"),
20 }
21 }
22}