1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! RONF is a configuration library based on [config-rs](https://github.com/rust-cli/config-rs).
//!
//! Configuration is stored in a `Config` structure. It can be created using a builder.
//! ```rust
//! use ronf::Config;
//! let config = Config::builder().build().unwrap();
//! ```
//!
//! On the builder there is a function `add_file(file: File)` which adds a file to read
//! configuration from.
//! File can be created with `ronf::File::new("config.json", ronf::FileFormat::Json,
//! "{\"key\":\"value\"")` or loaded from disk if `read_file` feature is enabled.
//! ```rust
//! #[cfg(feature = "json")]
//! {
//! use ronf::{Config, File, FileFormat};
//! let file: File = File::new_str(
//! "config.json",
//! ronf::FileFormat::Json,
//! "{\"key\":\"value\"}",
//! );
//! let config = Config::builder()
//! .add_file(file)
//! .build()
//! .unwrap();
//! println!("\"key\": {}", config.get("key").unwrap());
//! }
//! ```
//!
//! Check `examples/saves.rs` to see how to save changes to a config.
pub use crate;
pub use crate;
pub use crateValue;