We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 975d715 + 7d17f91 commit cbb52d7Copy full SHA for cbb52d7
src/config.rs
@@ -139,6 +139,7 @@ impl Config {
139
Ok(self)
140
}
141
142
+ /// Set a default `value` at `key`
143
pub fn set_default<T>(&mut self, key: &str, value: T) -> Result<&mut Config>
144
where
145
T: Into<Value>,
@@ -156,6 +157,14 @@ impl Config {
156
157
self.refresh()
158
159
160
+ /// Set an overwrite
161
+ ///
162
+ /// This function sets an overwrite value.
163
+ /// The overwrite `value` is written to the `key` location on every `refresh()`
164
165
+ /// # Warning
166
167
+ /// Errors if config is frozen
168
pub fn set<T>(&mut self, key: &str, value: T) -> Result<&mut Config>
169
170
0 commit comments