✨ feat(config): add get_rule function to retrieve existing rules
- implement get_rule function to fetch rule by id
This commit is contained in:
committed by
Jeremiah Russell
parent
ee3c43e54d
commit
d05f03fc1e
@@ -50,6 +50,11 @@ impl Config {
|
||||
self
|
||||
}
|
||||
|
||||
/// Get the contents of an existing rule
|
||||
pub fn get_rule(&self, id: usize) -> Option<EolRule> {
|
||||
self.rules.get(&id.to_string()).cloned()
|
||||
}
|
||||
|
||||
/// Add a new rule to the rule set by setting the retention age
|
||||
pub fn add_rule(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user