Trait arti::reload_cfg::ReconfigurableModule

source ·
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§

source

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.

Implementations on Foreign Types§

source§

impl<R: Runtime> ReconfigurableModule for TorClient<R>

Implementors§