11 releases (7 breaking)
Uses old Rust 2015
0.7.2 | Oct 23, 2016 |
---|---|
0.7.0 | Apr 26, 2016 |
0.6.0 | Oct 19, 2015 |
#557 in Configuration
100 downloads per month
12KB
318 lines
Configuration
The package provides a malleable tree structure.
Documentation
Example
let tree = configuration::format::TOML::parse(r#"
message = "one"
[foo.bar]
message = "two"
[foo.baz]
answer = 42
"#).unwrap();
assert_eq!(tree.get::<String>("message").unwrap(), "one");
assert_eq!(tree.get::<String>("foo.message").unwrap(), "one");
assert_eq!(tree.get::<String>("foo.bar.message").unwrap(), "two");
assert_eq!(tree.get::<String>("foo.baz.message").unwrap(), "one");
let tree = tree.branch("foo.baz").unwrap();
assert_eq!(tree.get::<i64>("answer").unwrap(), &42);
Contribution
Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.
Dependencies
~155KB