pub struct ConfigReloader { /* private fields */ }Expand description
Configuration reloader for detecting and applying configuration changes
Monitors configuration files for changes and reloads hooks when changes are detected. Preserves hook state (enabled/disabled) during reload.
Implementations§
Source§impl ConfigReloader
impl ConfigReloader
Sourcepub fn has_changed(&mut self) -> Result<bool>
pub fn has_changed(&mut self) -> Result<bool>
Check if configuration has changed
Returns true if any configuration file has been modified since the last check.
Sourcepub fn save_hook_state(&mut self, hooks: &HashMap<String, Hook>)
pub fn save_hook_state(&mut self, hooks: &HashMap<String, Hook>)
Save hook state before reload
Saves the enabled/disabled state of all hooks so it can be restored after reloading configuration.
Sourcepub fn restore_hook_state(&self, hooks: &mut HashMap<String, Hook>)
pub fn restore_hook_state(&self, hooks: &mut HashMap<String, Hook>)
Restore hook state after reload
Restores the enabled/disabled state of hooks after reloading configuration. Hooks that were disabled before reload remain disabled, and hooks that were enabled remain enabled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigReloader
impl RefUnwindSafe for ConfigReloader
impl Send for ConfigReloader
impl Sync for ConfigReloader
impl Unpin for ConfigReloader
impl UnwindSafe for ConfigReloader
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