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:
parent
2854e88dcc
commit
cf234437d7
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue