MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / add_metadata

Method add_metadata

python/src/tools/result.rs:114–118  ·  view source on GitHub ↗

Add metadata to the result

(&mut self, key: String, value: &Bound<'_, PyAny>)

Source from the content-addressed store, hash-verified

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> {

Calls 2

python_to_json_valueFunction · 0.85
insertMethod · 0.80