Add metadata to the result
(&mut self, key: String, value: &Bound<'_, PyAny>)
| 112 | |
| 113 | /// Add metadata to the result |
| 114 | pub fn add_metadata(&mut self, key: String, value: &Bound<'_, PyAny>) -> PyResult<()> { |
| 115 | let json_value = python_to_json_value(value)?; |
| 116 | self.metadata.insert(key, json_value); |
| 117 | Ok(()) |
| 118 | } |
| 119 | |
| 120 | /// Get metadata value by key |
| 121 | pub fn get_metadata(&self, key: &str) -> Option<String> { |