pub struct RuleExecutor<'a> { /* private fields */ }Expand description
Executes a rule against a profile to create a new customized profile.
Implementations§
Source§impl<'a> RuleExecutor<'a>
impl<'a> RuleExecutor<'a>
pub fn new(rule: &'a Rule, profile_manager: &'a ProfileManager) -> Self
Sourcepub fn generate_prompt(&self, profile: &Profile) -> Result<String>
pub fn generate_prompt(&self, profile: &Profile) -> Result<String>
Generate the full prompt for AI.
Sourcepub fn apply(
&self,
profile: &Profile,
new_name: Option<&str>,
dry_run: bool,
) -> Result<ApplyResult>
pub fn apply( &self, profile: &Profile, new_name: Option<&str>, dry_run: bool, ) -> Result<ApplyResult>
Apply the rule to create a new profile.
Sourcepub fn apply_with_retries(
&self,
profile: &Profile,
new_name: Option<&str>,
dry_run: bool,
max_retries: usize,
) -> Result<ApplyResult>
pub fn apply_with_retries( &self, profile: &Profile, new_name: Option<&str>, dry_run: bool, max_retries: usize, ) -> Result<ApplyResult>
Apply the rule with validation and automatic retries.
Auto Trait Implementations§
impl<'a> Freeze for RuleExecutor<'a>
impl<'a> RefUnwindSafe for RuleExecutor<'a>
impl<'a> Send for RuleExecutor<'a>
impl<'a> Sync for RuleExecutor<'a>
impl<'a> Unpin for RuleExecutor<'a>
impl<'a> UnsafeUnpin for RuleExecutor<'a>
impl<'a> UnwindSafe for RuleExecutor<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more