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
//! A `config` source read as one layer of a load.
//!
//! The other half of [`Source::config_source`](crate::Source::config_source),
//! which is the one door this backend appears at in the crate's own API —
//! the twin of figment's, and there for the same reason: a store, a
//! format or a shape this crate does not ship, wired in without forking
//! it.
//!
//! **Simpler than figment's twin, because the backend is simpler here.**
//! figment files values under *profiles*, so reading one means deciding
//! which profiles mean "this section". A `config` source hands over a
//! flat map of keys and nothing else, so what it collects is what the
//! layer is.
use BTreeMap;
use crateError;
use crateValue;
/// Everything the source has to say, as this crate's tree.
///
/// # Errors
///
/// If the source refuses to collect — a file it cannot read, a document
/// it cannot parse.
pub