Files
cull-gmail/src/eol_action.rs
Jeremiah Russell 40ea9e52f4 ♻️ refactor(cli): rename command to sub_command for clarity
- rename `command` field to `sub_command` in `Cli` and `ConfigCli` structs
- rename `Commands` enum to `SubCmds` to reflect its role as subcommand
- update references to the renamed fields and enum variants
- this improves code readability and avoids confusion with other command concepts

🐛 fix(config): correct method name for setting eol action

- rename `set_command` to `set_action` in `EolRule` struct
- update references in `config.rs` to use the correct method name
- this fixes a bug where the eol action was not being set correctly
2025-10-09 14:30:21 +01:00

23 lines
618 B
Rust

use std::fmt;
/// End of life action
/// - 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 EolAction {
#[default]
/// Move the message to the trash
Trash,
/// Delete the message immediately
Delete,
}
impl fmt::Display for EolAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
EolAction::Trash => write!(f, "trash"),
EolAction::Delete => write!(f, "delete"),
}
}
}