MCPcopy Index your code
hub / github.com/encounter/objdiff / set_property

Method set_property

objdiff-wasm/src/api.rs:559–566  ·  view source on GitHub ↗
(&self, key: String, value: String)

Source from the content-addressed store, hash-verified

557 fn new() -> Self { Self(RefCell::new(diff::DiffObjConfig::default())) }
558
559 fn set_property(&self, key: String, value: String) -> Result<(), String> {
560 let id = diff::ConfigPropertyId::from_str(&key)
561 .map_err(|_| format!("Invalid property key {:?}", key))?;
562 self.0
563 .borrow_mut()
564 .set_property_value_str(id, &value)
565 .map_err(|_| format!("Invalid property value {:?}", value))
566 }
567
568 fn get_property(&self, key: String) -> Result<String, String> {
569 let id = diff::ConfigPropertyId::from_str(&key)

Callers

nothing calls this directly

Calls 1

from_strFunction · 0.85

Tested by

no test coverage detected