Sets the given key from an optional value. Removes the key if the value is `None`.
(&mut self, key: Param, value: Option<impl ToString>)
| 365 | /// Sets the given key from an optional value. |
| 366 | /// Removes the key if the value is `None`. |
| 367 | pub fn set_optional(&mut self, key: Param, value: Option<impl ToString>) -> &mut Self { |
| 368 | if let Some(value) = value { |
| 369 | self.set(key, value) |
| 370 | } else { |
| 371 | self.remove(key) |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | /// Check if there are any values in this. |
| 376 | pub fn is_empty(&self) -> bool { |
no test coverage detected