arti::reload_cfg

Trait 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§