pub struct OverrideSystem { /* private fields */ }Expand description
Main override system that coordinates all components
Implementations§
Source§impl OverrideSystem
impl OverrideSystem
Sourcepub fn generate_key(&mut self, context: &FunctionContext) -> Result<OverrideKey>
pub fn generate_key(&mut self, context: &FunctionContext) -> Result<OverrideKey>
Generate a stable key from context
Sourcepub fn save_override(
&self,
key: OverrideKey,
override_config: CommandOverride,
context: &FunctionContext,
) -> Result<()>
pub fn save_override( &self, key: OverrideKey, override_config: CommandOverride, context: &FunctionContext, ) -> Result<()>
Save an override with the given key
Sourcepub fn save_override_with_validation(
&self,
key: OverrideKey,
override_config: CommandOverride,
context: &FunctionContext,
command: &str,
) -> Result<()>
pub fn save_override_with_validation( &self, key: OverrideKey, override_config: CommandOverride, context: &FunctionContext, command: &str, ) -> Result<()>
Save an override with validation
Sourcepub fn resolve_override(
&mut self,
context: &FunctionContext,
) -> Result<Option<CommandOverride>>
pub fn resolve_override( &mut self, context: &FunctionContext, ) -> Result<Option<CommandOverride>>
Resolve an override from context
Sourcepub fn resolve_with_strategy(
&mut self,
context: &FunctionContext,
) -> Result<Option<(CommandOverride, ResolutionStrategy)>>
pub fn resolve_with_strategy( &mut self, context: &FunctionContext, ) -> Result<Option<(CommandOverride, ResolutionStrategy)>>
Resolve override with strategy information
Sourcepub fn preview_override(
&self,
params: PreviewParams<'_>,
) -> Result<OverridePreview>
pub fn preview_override( &self, params: PreviewParams<'_>, ) -> Result<OverridePreview>
Create a preview of changes
Sourcepub fn list_all(&self) -> Result<Vec<OverrideEntry>>
pub fn list_all(&self) -> Result<Vec<OverrideEntry>>
List all overrides
Sourcepub fn list_by_file(&self, file_path: &Path) -> Result<Vec<OverrideEntry>>
pub fn list_by_file(&self, file_path: &Path) -> Result<Vec<OverrideEntry>>
List overrides for a specific file
Sourcepub fn delete_override(&self, key: &str) -> Result<bool>
pub fn delete_override(&self, key: &str) -> Result<bool>
Delete an override by key
Sourcepub fn clear_by_file(&self, file_path: &Path) -> Result<usize>
pub fn clear_by_file(&self, file_path: &Path) -> Result<usize>
Clear overrides for a specific file
Sourcepub fn debug_resolution(
&mut self,
context: &FunctionContext,
) -> Result<Vec<(OverrideEntry, ResolutionStrategy, f32)>>
pub fn debug_resolution( &mut self, context: &FunctionContext, ) -> Result<Vec<(OverrideEntry, ResolutionStrategy, f32)>>
Debug: Get resolution candidates
Sourcepub fn get_function_context(
&mut self,
file_path: &Path,
line: usize,
column: Option<usize>,
) -> Result<FunctionContext>
pub fn get_function_context( &mut self, file_path: &Path, line: usize, column: Option<usize>, ) -> Result<FunctionContext>
Get function context from file position
Sourcepub fn update_execution_status(&self, key: &str, success: bool) -> Result<()>
pub fn update_execution_status(&self, key: &str, success: bool) -> Result<()>
Update execution status of an override
Sourcepub fn rollback_to_last_backup(&self) -> Result<()>
pub fn rollback_to_last_backup(&self) -> Result<()>
Rollback to last backup
Sourcepub fn get_problematic_overrides(
&self,
failure_threshold: u32,
) -> Result<Vec<OverrideEntry>>
pub fn get_problematic_overrides( &self, failure_threshold: u32, ) -> Result<Vec<OverrideEntry>>
Get overrides that have failed multiple times
Auto Trait Implementations§
impl !Freeze for OverrideSystem
impl RefUnwindSafe for OverrideSystem
impl Send for OverrideSystem
impl Sync for OverrideSystem
impl Unpin for OverrideSystem
impl UnwindSafe for OverrideSystem
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