-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add all keys for merge-configuration
- Loading branch information
Showing
4 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use crate::config; | ||
use crate::config::tree::SubSectionRequirement; | ||
use crate::config::{ | ||
tree::{keys, Key, Merge, Section}, | ||
Tree, | ||
}; | ||
|
||
impl Merge { | ||
/// The `merge.renormalize` key | ||
pub const RENORMALIZE: keys::Boolean = keys::Boolean::new_boolean("renormalize", &Tree::MERGE); | ||
/// The `merge.default` key | ||
pub const DEFAULT: keys::String = keys::String::new_string("default", &Tree::MERGE); | ||
/// The `merge.<driver>.name` key. | ||
pub const DRIVER_NAME: keys::String = keys::String::new_string("name", &config::Tree::MERGE) | ||
.with_subsection_requirement(Some(SubSectionRequirement::Parameter("driver"))); | ||
/// The `merge.<driver>.driver` key. | ||
pub const DRIVER_COMMAND: keys::Program = keys::Program::new_program("driver", &config::Tree::MERGE) | ||
.with_subsection_requirement(Some(SubSectionRequirement::Parameter("driver"))); | ||
/// The `merge.<driver>.recursive` key. | ||
pub const DRIVER_RECURSIVE: keys::String = keys::String::new_string("recursive", &config::Tree::MERGE) | ||
.with_subsection_requirement(Some(SubSectionRequirement::Parameter("driver"))); | ||
} | ||
|
||
impl Section for Merge { | ||
fn name(&self) -> &str { | ||
"merge" | ||
} | ||
|
||
fn keys(&self) -> &[&dyn Key] { | ||
&[ | ||
&Self::RENORMALIZE, | ||
&Self::DEFAULT, | ||
&Self::DRIVER_NAME, | ||
&Self::DRIVER_COMMAND, | ||
&Self::DRIVER_RECURSIVE, | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters