Skip to content

Commit bc81bba

Browse files
committed
Add doc: Config:set()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
1 parent 975d715 commit bc81bba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/config.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ impl Config {
156156
self.refresh()
157157
}
158158

159+
/// Set an overwrite
160+
///
161+
/// This function sets an overwrite value.
162+
/// The overwrite `value` is written to the `key` location on every `refresh()`
163+
///
164+
/// # Warning
165+
///
166+
/// Errors if config is frozen
159167
pub fn set<T>(&mut self, key: &str, value: T) -> Result<&mut Config>
160168
where
161169
T: Into<Value>,

0 commit comments

Comments
 (0)