use crate::{
common::{error::Result, log::LoglevelFilter, types::PluginType},
host::{
configuration::{plugin::log::PluginLogConfiguration, ReproductionPathStyle},
plugin::Plugin,
reproduction::PluginReproduction,
},
};
use std::fmt::Debug;
pub mod log;
pub mod process;
pub mod thread;
pub trait PluginConfiguration: Debug {
fn instantiate(self: Box<Self>) -> Box<dyn Plugin>;
fn get_log_configuration(&self) -> PluginLogConfiguration;
fn get_type(&self) -> PluginType;
fn get_reproduction(&self, path_style: ReproductionPathStyle) -> Result<PluginReproduction>;
fn limit_verbosity(&mut self, max_verbosity: LoglevelFilter);
fn set_default_name(&mut self, default_name: String);
}
impl PluginConfiguration {
pub fn get_name(&self) -> String {
self.get_log_configuration().name
}
}