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

Function require_str

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

Source from the content-addressed store, hash-verified

322}
323
324fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> {
325 opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'")))
326}
327
328fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> {
329 match fm.get(key) {

Callers 1

lift_intentFunction · 0.70

Calls 1

opt_strFunction · 0.70

Tested by

no test coverage detected