Add the given (key, value) pair to the header
(&mut self, key: impl Into<String>, value: T)
| 131 | |
| 132 | /// Add the given (key, value) pair to the header |
| 133 | pub fn insert<T>(&mut self, key: impl Into<String>, value: T) |
| 134 | where |
| 135 | T: Serialize, |
| 136 | { |
| 137 | let value = |
| 138 | serde_json::to_value(value).expect("serializing extra header value must not fail"); |
| 139 | self.inner.insert(key.into(), value); |
| 140 | } |
| 141 | |
| 142 | /// Get the raw extra values specified in the header |
| 143 | pub fn inner(&self) -> &BTreeMap<String, serde_json::Value> { |
no outgoing calls