MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / require_str

Function require_str

atomic-canonical/src/memory.rs:223–226  ·  view source on GitHub ↗
(fm: &Map<String, Value>, key: &str)

Source from the content-addressed store, hash-verified

221}
222
223fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> {
224 opt_str(fm, key)
225 .ok_or_else(|| CanonicalError::Lift(format!("memory frontmatter missing '{key}'")))
226}
227
228fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> {
229 match fm.get(key) {

Callers 1

lift_memoryFunction · 0.70

Calls 1

opt_strFunction · 0.70

Tested by

no test coverage detected