pub trait ModuleLoader {
// Required method
fn load_module(
&mut self,
config: &ServerConfiguration,
global_config: Option<&ServerConfiguration>,
secondary_runtime: &Runtime,
) -> Result<Arc<dyn Module + Send + Sync>, Box<dyn Error + Send + Sync>>;
// Provided methods
fn get_requirements(&self) -> Vec<&'static str> { ... }
fn validate_configuration(
&self,
config: &ServerConfiguration,
used_properties: &mut HashSet<String>,
) -> Result<(), Box<dyn Error + Send + Sync>> { ... }
}
Expand description
A trait that defines a module loader
Required Methods§
Sourcefn load_module(
&mut self,
config: &ServerConfiguration,
global_config: Option<&ServerConfiguration>,
secondary_runtime: &Runtime,
) -> Result<Arc<dyn Module + Send + Sync>, Box<dyn Error + Send + Sync>>
fn load_module( &mut self, config: &ServerConfiguration, global_config: Option<&ServerConfiguration>, secondary_runtime: &Runtime, ) -> Result<Arc<dyn Module + Send + Sync>, Box<dyn Error + Send + Sync>>
Loads a module according to specific configuration
Provided Methods§
Sourcefn get_requirements(&self) -> Vec<&'static str>
fn get_requirements(&self) -> Vec<&'static str>
Determines configuration properties required to load a module