Aspect: Optionally get configuration

This commit is contained in:
Matthias Beyer 2016-03-05 18:35:03 +01:00
parent f1246093f1
commit 96deb17515

View file

@ -7,17 +7,20 @@ use hook::accessor::HookDataAccessor as HDA;
use hook::error::HookError as HE;
use hook::error::HookErrorKind as HEK;
use configuration::AspectConfig;
#[derive(Debug)]
pub struct Aspect {
cfg: Option<AspectConfig>,
name: String,
hooks: Vec<Box<Hook>>,
}
impl Aspect {
pub fn new(name: String) -> Aspect {
pub fn new(name: String, cfg: Option<AspectConfig>) -> Aspect {
Aspect {
cfg: cfg,
name: name,
hooks: vec![],
}