diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-03-19 08:49:52 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-03-19 08:49:52 +0100 |
commit | bc81bba0ab5e4e835245a7b8dfb55f4a3d9ff8b1 (patch) | |
tree | 20f1b1e62dc72adf93cbc2070aabbd462342efc4 /src/config.rs | |
parent | 975d7158b8f0bf1135080dc94162f2f0b6a3b28d (diff) |
Add doc: Config:set()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 1019061..d8d36be 100644 --- a/src/config.rs +++ b/src/config.rs @@ -156,6 +156,14 @@ impl Config { self.refresh() } + /// Set an overwrite + /// + /// This function sets an overwrite value. + /// The overwrite `value` is written to the `key` location on every `refresh()` + /// + /// # Warning + /// + /// Errors if config is frozen pub fn set<T>(&mut self, key: &str, value: T) -> Result<&mut Config> where T: Into<Value>, |