- changed the type of the key used in the rules BTreeMap from usize to String
- this change makes it easier to serialize and deserialize the configuration
- updated the remove_rule_by_id and remove_rule_by_label functions to use string keys
- add `rm` subcommand to remove rules by id or label
- add `id` and `label` options to `rm` subcommand
- implement `remove_rule_by_id` and `remove_rule_by_label` in `Config`
- migrate labels from Vec to BTreeSet for uniqueness and order
- add `remove_label` function to remove specific labels
- change `labels()` function return type from `&Vec<String>` to `Vec<String>`
- implement `Clone` trait for `EolRule`
- introduce `NoRuleSelector`, `NoRuleFoundForLabel`, and `LabelNotFoundInRules` errors
- these errors provide more specific feedback when rule selection fails
- change rules storage from BTreeMap<String, EolRule> to BTreeMap<usize, EolRule>
- implement functions to remove rules by ID or label
- add helper functions to retrieve labels and rules associated with labels
- improve error handling for missing labels or rules
- fix the inaccurate description in the `to_string` method for `EolRule`
- correct the description to properly display that the rule moves the message to trash
- rename `command` field in `EolRule` to `action`
- update `set_command` method to use `EolAction` enum
- adjust display formatting to reflect the change to "action"
- allow retention rules to be configured to delete messages
- add `delete` flag to `add_rule` function
- add `set_command` function to `EolRule` to set the action to delete
- allow associating labels with retention rules for more granular control
- add label parameter to `add_rule` function
- check for duplicate rules and labels before adding new ones
- migrate rules from Vec to BTreeMap for efficient access
- add rule existence check to prevent duplicates
- improve rule listing by iterating over values
- rename config cli to rules cli for better clarity
- move config loading to rules cli for better modularity
- update command matching to use the new rules cli
- add display trait implementation for eolrule struct to provide a user-friendly representation of the rule's configuration
- the display format includes the rule id, labels, and retention period, making it easier to understand the rule's settings
- rename config_cli to rules_cli for better clarity
- rename ConfigCommands to RulesCommands for better clarity
- rename ConfigCli to RulesCli for better clarity
- fix typo in `Delete` variant description from "immediatly" to "immediately"
- correct grammar in trash log message from "move to trash" to "moved to trash"
- add config.rs to handle program configuration
- create default configuration with retention rules
- implement save and load functions for persistent storage
- add credential file setting
- add MessageAge enum to represent retention periods in days, weeks, months, or years
- implement Display trait for MessageAge to format retention periods
- implement label function to generate retention label
- introduce EolRule struct with fields for id, retention, labels, query, and command
- implement methods for creating new rules, setting retention, and adding labels
- add default implementation for EolRule
- introduce `Retention` struct to define data retention period and label generation flag
- add `MessageAge` enum to represent different retention time units (days, months, years)
- implement default values for retention policy (5 years, generate label)