feat(processor): add execute flag to GmailClient

- add the execute flag to control the execution of the GmailClient
- implement setter function for the execute flag
This commit is contained in:
Jeremiah Russell
2025-10-13 17:30:45 +01:00
committed by Jeremiah Russell
parent 35235afc26
commit 20fbae74e6

View File

@@ -56,6 +56,8 @@ use crate::{
/// Rules processor to apply the configured rules to the mailbox. /// Rules processor to apply the configured rules to the mailbox.
pub trait RuleProcessor { pub trait RuleProcessor {
/// Set the execute flag in the client
fn set_execute(&mut self, value: bool);
/// Delete messages /// Delete messages
fn delete_messages( fn delete_messages(
&mut self, &mut self,
@@ -83,8 +85,13 @@ impl RuleProcessor for GmailClient {
// } // }
/// Add Action to the Client for processing /// Add Action to the Client for processing
fn set_rule(&mut self, rule: EolRule) { fn set_rule(&mut self, value: EolRule) {
self.rule = Some(rule); self.rule = Some(value);
}
/// Set the execute flag
fn set_execute(&mut self, value: bool) {
self.execute = value;
} }
/// The action set in the rule /// The action set in the rule