pub trait ReconfigurableModule: Send + Sync {
// Required method
fn reconfigure(&self, new: &ArtiCombinedConfig) -> Result<()>;
}
Expand description
An object that can be reconfigured when our configuration changes.
We use this trait so that we can represent abstract modules in our application, and pass the configuration to each of them.
Required Methods§
Sourcefn reconfigure(&self, new: &ArtiCombinedConfig) -> Result<()>
fn reconfigure(&self, new: &ArtiCombinedConfig) -> Result<()>
Try to reconfigure this module according to a newly loaded configuration.
By convention, this should only return fatal errors; any such error should cause the program to exit. For other cases, we should just warn.