Returns boolean configuration value for the given key.
(&self, key: &str)
| 630 | |
| 631 | /// Returns boolean configuration value for the given key. |
| 632 | pub async fn get_raw_config_bool(&self, key: &str) -> Result<bool> { |
| 633 | // Not the most obvious way to encode bool as string, but it is matter |
| 634 | // of backward compatibility. |
| 635 | let res = self.get_raw_config_int(key).await?; |
| 636 | Ok(res.unwrap_or_default() > 0) |
| 637 | } |
| 638 | |
| 639 | /// Sets configuration for the given key to boolean value. |
| 640 | pub async fn set_raw_config_bool(&self, key: &str, value: bool) -> Result<()> { |
no test coverage detected