From 6c568726be3680a98bfff24a67e8bc3082a0cc90 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Tue, 7 Feb 2017 17:13:22 -0800 Subject: :memo: --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index f6aa545..7a386d7 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,13 @@ > Layered configuration system for Rust applications (with strong support for [12-factor] applications). [12-factor]: https://12factor.net/config - + - Set defaults - Set explicit values (to programmatically override) - Read from [JSON] and [TOML] files - Read from environment - Loosely typed — Configuration values may be read in any supported type, as long as there exists a reasonable conversion + - Access nested fields using a formatted path — Uses a subset of JSONPath. Currently supports the child ( `redis.port` ) and subscript operators ( `databases[0].name` ). [JSON]: https://github.com/serde-rs/json [TOML]: https://github.com/toml-lang/toml @@ -29,7 +30,7 @@ config = "0.2" ## Usage -Configuration is gathered by building a `Source` and then merging that source into the +Configuration is gathered by building a `Source` and then merging that source into the current state of the configuration. ```rust @@ -46,11 +47,11 @@ fn main() { } ``` -Note that in the above example the calls to `config::merge` could have -been re-ordered to influence the priority as each successive merge +Note that in the above example the calls to `config::merge` could have +been re-ordered to influence the priority as each successive merge is evaluated on top of the previous. -Configuration values can be retrieved with a call to `config::get` and then +Configuration values can be retrieved with a call to `config::get` and then coerced into a type with `as_*`. ```toml @@ -72,14 +73,14 @@ fn main() { } ``` -See the [examples](https://github.com/mehcode/config-rs/tree/master/examples) for +See the [examples](https://github.com/mehcode/config-rs/tree/master/examples) for more usage information. ## Roadmap - [ ] Read from remote source — [etcd](https://github.com/jimmycuadra/rust-etcd) and [consul](https://github.com/stusmall/consul-rust) - [ ] Read from YAML files - [ ] Read from Libconfig files - + All suggestions are welcome. Please make an issue. ## License -- cgit v1.2.3