Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-01-29 | use 'Self' to refer to own type | Daniel Eades | |
2021-12-29 | use implicit iter loops | Daniel Eades | |
2021-12-29 | de-glob imports | Daniel Eades | |
2021-11-23 | rename try_into to try_deserialize to avoid confusion | Conrad Ludgate | |
2021-08-15 | Rename MapImpl to Map | David Orchard | |
2021-08-15 | Move order preservation under a feature gate | David Orchard | |
2021-08-15 | Use LinkedHashMap in place of HashMap | David Orchard | |
2021-06-26 | Reimplement the Config building mechanism | Radosław Kot | |
This patch rewrites the Config building mechanism using special objects for tracking the config building state. Transitions between states are done on the fly as required. This is required so that the async sources can be stored inside the configuration building objects, while keeping out the expenses in the non-async case, so a user of the crate has only to pay for what they are using (no async means no overhead for that). Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Reviewed-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-05-08 | Use ConfigBuilder in env.rs tests | Radosław Kot | |
2021-05-08 | Modify tests to use both ConfigBuilder and Config | Radosław Kot | |
2021-05-08 | Add ConfigBuilder | Radosław Kot | |
2021-04-09 | Ensure order in the galaxy... I mean the imports | Matthias Beyer | |
This patch sorts the imports: 1. std imports 2. external crate imports 3. own module imports In three blocks, each alphabetically (with is also enforced by rustfmt). As well as it prefixes the imports of own modules with crate:: This is just a quality-of-life patch :-) Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-04-09 | Remove unused imports | Matthias Beyer | |
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-04-01 | Remove ConfigKind type | Matthias Beyer | |
This patch removes the ConfigKind::Frozen mechansim, which wasn't exported through the public interface at all. Because the ::Frozen variant was removed, the ConfigKind::Mutable variant is the only one remaining and because the ConfigKind type isn't exported in the API as well, we can move the variant members to the Config struct itself. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-03-31 | Fix: Add missing Config::freeze() function | Matthias Beyer | |
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-03-28 | Rename get_str() → get_string() to match returned type | Caleb Maclennan | |
2021-03-26 | Remove Config::new() | Matthias Beyer | |
Removes the ::new() constructor, because Config::default() does the same. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-03-19 | Add doc: Config::set_default() | Matthias Beyer | |
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-03-19 | Add doc: Config:set() | Matthias Beyer | |
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-03-17 | Merge pull request #172 from matthiasbeyer/add-setter | Matthias Beyer | |
Add setter for setting config value once | |||
2021-03-17 | Add a Config::set_once() function to set a value once (and let ↵ | Matthias Beyer | |
Config::merge() overwrite it later Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2021-03-17 | Add Config::with_merged() | Matthias Beyer | |
This patch adds a builder-pattern version of Config::merge(), which can be used for method-chain-building Config objects. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2020-10-01 | Run cargo-fmt | Matthias Beyer | |
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> | |||
2020-03-14 | General upgrade for clippy fix and remove of deprecated methods for errors | Federico Pasqua | |
2019-12-07 | Remove automatic lowercase | Ryan Leckey | |
2019-05-09 | Remove ValueWithKey struct | Guillem Nieto | |
While using this library, I end up having lifetime issues with `Config::get`. I've seen that current implementation forces the calleer to match `key` lifetime to the output of the function. My use case is, under some circumstances, return a suffixed version of the config key. Something similar to: ``` if some_condition == true { let key_name = format!("{}_suffix", key); self.config.get(&key_name) } else { self.config.get(key) } ``` This code is noy compiling for me due to conflicting lifetimes. To avoid this, I've started looking to the code and I've found that `key` needed this lifetime because of `ValueWithKey`. The purpouse of this struct seems to be add more information to the errors that are returned to the user. To mitigate this lifetime coupling I've: - Mapped the error on `Config::get` to include the originating key of the current error - Remove all the code related with `ValueWithKey` | |||
2019-05-09 | Remove try_defaults_from and set_defaults (for now) as '#[serde(default)]' ↵ | Ryan Leckey | |
works thanks to #106 | |||
2019-04-08 | Add missing doc | tyranron | |
2019-04-08 | Fix annoying 'invalid type: unit value, expected struct Settings' error | tyranron | |
2019-04-08 | Bootstrap solution | tyranron | |
2018-07-02 | Run rustfmt (nightly) | Ryan Leckey | |
2018-04-06 | Add config serialize ability | XX | |
2017-08-05 | Fix tests and put back .deserialize as deprecated0.7.0 | Ryan Leckey | |
2017-07-30 | Impl Deserializer for Config (to forward Value) | Ryan Leckey | |
2017-07-30 | Impl Config for Source to allow merging whole configs; closes #28 | Ryan Leckey | |
2017-07-30 | Remove ConfigResult; close #36 | Ryan Leckey | |
2017-06-23 | Clean up ConfigResult type. Make it more ergonomic to use. | Ryan Leckey | |
2017-06-22 | Implement Source for Vec<T: Source> and From<Path> for File | Ryan Leckey | |
2017-06-22 | Add builder API to Config | Ryan Leckey | |
2017-06-16 | Fix a couple issues, mainly with env source | Ryan Leckey | |
2017-06-13 | Ensure config keys are case insensitive | Ryan Leckey | |
2017-06-13 | Add more tests on files | Ryan Leckey | |
2017-06-13 | :shirt: Fix clippy warnings | Ryan Leckey | |
2017-06-03 | Add set and set_default (and deep merging) | Ryan Leckey | |
2017-06-01 | Move things around and get some tests in place | Ryan Leckey | |
2017-03-08 | Initial work on deep serde integration | Ryan Leckey | |
2017-02-12 | Decorate Box<Source> with Send + Sync | Ryan Leckey | |
2017-02-12 | Remove global API | Ryan Leckey | |
2017-02-11 | Move to copy API instead of reference; fixes #9 | Ryan Leckey | |
2017-02-08 | Implement 'namespace' on File | Ryan Leckey | |