1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
}
}