summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2021-03-14Rename try_into/try_fromMatthias Beyer
Because of the clash in names with the TryInto and TryFrom traits, we're renaming the functions here to try_serialize/try_deserialize. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-14Merge branch 'update-rust-ini'Matthias Beyer
2021-03-14Merge branch 'builder'Matthias Beyer
2021-03-14Update dependency: rust-ini: 0.13 -> 0.16Fabio Valentini
Cherry picked, fixed merge conflict in Cargo.toml and ran cargo-fmt on the new tree. (cherry picked from commit 43ca83a4fa6ea55274f7c78a1914fe93476916ed) Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-13Add 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>
2021-03-13Add 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-13Fix clippy: Use is_empty() instead of comparing to empty stringMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-10-01Run cargo-fmtMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-14General upgrade for clippy fix and remove of deprecated methods for errorsFederico Pasqua
2019-12-07Merge pull request #119 from vorner/universal-map-keysRyan Leckey
Allow arbitrary types of map keys
2019-12-07Remove automatic lowercaseRyan Leckey
2019-08-22Allow arbitrary types of map keysMichal 'vorner' Vaner
Of particular interest are maps that have numbers or enums as keys. Closes #74.
2019-06-27port to nom 5Geoffroy Couprie
2019-05-09Remove ValueWithKey structGuillem 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-09Remove try_defaults_from and set_defaults (for now) as '#[serde(default)]' ↵Ryan Leckey
works thanks to #106
2019-04-08Add missing doctyranron
2019-04-08Fix annoying 'invalid type: unit value, expected struct Settings' errortyranron
2019-04-08Bootstrap solutiontyranron
2019-01-03Re-export file source type markers (fixes #91)Ryan Leckey
2018-12-30Tracking a path where an error happens during deserializationMichal 'vorner' Vaner
Related to #83, but doesn't solve that specific problem :-(. That specific error message ("missing field") comes from somewhere else than this library.
2018-12-30Deserializing: Simplify the MapAccess thingMichal 'vorner' Vaner
2018-11-10support reading enums from configEugeen Sablin
2018-09-25Use a build config on Environment instead of a feature flag for #78Ryan Leckey
2018-09-26Treat empty environment variables as unsetPhil Booth
2018-07-02Update readme/changelog for 0.9Ryan Leckey
2018-07-02Run rustfmt (nightly)Ryan Leckey
2018-07-02Merge branch 'feature/ini' of https://github.com/woodgear/config-rsRyan Leckey
2018-07-02Fix test failures from upgrade to nom 4Ryan Leckey
2018-07-02Merge branch 'master' of https://github.com/Geal/config-rsRyan Leckey
2018-07-02Merge branch 'master' of https://github.com/limbo-rs/config-rsRyan Leckey
2018-06-25option rust-inisan.dai
2018-06-15fix doc testsaber.wu
2018-06-15support inisaber.wu
2018-04-09Mark Value docs as textAleksey Ivanov
2018-04-09[Close #70] Support newtype struct deserializationAleksey Ivanov
2018-04-08Add ConfigSerializerXX
2018-04-08Fix initialy set arr pathXX
2018-04-06Add config serialize abilityXX
2018-03-12Merge pull request #59 from ChriFo/fix/envRyan Leckey
Adjust environment variable handling
2018-02-17update to nom 4Geoffroy Couprie
2018-01-29add default prefix separatorChristian Fochler
- no need to add '_' to the prefix
2018-01-28make separator optionalChristian Fochler
2018-01-28Revert "remove unnecessary env key manipulation"Christian Fochler
This reverts commit 36b477df0f9bda4d153b674b3007ee087e44d67f.
2018-01-26Merge pull request #54 from cmyr/partialeq-valueRyan Leckey
Add derive(PartialEq) for Value, ValueType
2018-01-26Merge pull request #50 from snipsco/masterRyan Leckey
use nom's error_kind() to be robust againt nom feature selection accross a project
2017-12-14remove unnecessary env key manipulationChristian Fochler
2017-11-14Add derive(PartialEq) for Value, ValueTypeColin Rofls
- closes #51
2017-10-07Fix markdown listsSven-Hendrik Haase
2017-09-20fix weird nom errorkind issueMathieu Poumeyrol
2017-09-01Added HJSON (Human-Readable JSON) as a config file formatRaphael Cohn