Skip to content

Commit

Permalink
Add client config to set option as map
Browse files Browse the repository at this point in the history
  • Loading branch information
kination committed May 27, 2021
1 parent b4ec50e commit 768b2c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ impl ClientConfig {
self
}

/// Sets a parameter as `HashMap<String, String>` in the configuration.
///
/// If there is an existing value for `key` in the configuration, it is
/// overridden with the new `value`.
pub fn set_map(&mut self, map: HashMap<String, String>) -> &mut ClientConfig {
self.conf_map.extend(map);
self
}

/// Removes a parameter from the configuration.
pub fn remove<'a>(&'a mut self, key: &str) -> &'a mut ClientConfig {
self.conf_map.remove(key);
Expand Down

0 comments on commit 768b2c9

Please sign in to comment.