Skip to main content

ConfigEventHandler

Trait ConfigEventHandler 

Source
pub trait ConfigEventHandler: Send + Sync {
    // Required method
    fn on_config_change(&self, event: ConfigEvent);

    // Provided methods
    fn before_reload(&self, _source: &ConfigSource) -> bool { ... }
    fn after_reload(&self, _source: &ConfigSource) { ... }
}
Expand description

Trait for handling configuration events.

Implement this trait to receive notifications when configuration changes.

Required Methods§

Source

fn on_config_change(&self, event: ConfigEvent)

Called when a configuration event occurs.

Provided Methods§

Source

fn before_reload(&self, _source: &ConfigSource) -> bool

Called before configuration reload. Return false to cancel the reload.

Source

fn after_reload(&self, _source: &ConfigSource)

Called after successful configuration reload.

Implementors§