Implement Partial for Config

With this implemented, we can fetch the appropriate configuration easily
from the configuration.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-04-16 18:18:43 +02:00
parent 2854e88dcc
commit cf234437d7

View file

@ -28,6 +28,7 @@ use libimagerror::errors::ErrorMsg as EM;
use toml::Value;
use toml_query::read::TomlValueReadExt;
use toml_query::read::Partial;
use toml_query::delete::TomlValueDeleteExt;
use toml_query::insert::TomlValueInsertExt;
use failure::Fallible as Result;
@ -66,6 +67,11 @@ impl Deref for Config {
}
}
impl<'a> Partial<'a> for Config {
const LOCATION: &'static str = "ref.basepathes";
type Output = Self;
}
provide_kindflag_path!(pub IsRef, "ref.is_ref");
/// Fassade module