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

Function require_str

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

Source from the content-addressed store, hash-verified

335}
336
337fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> {
338 opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'")))
339}
340
341fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> {
342 match fm.get(key) {

Callers 1

lift_intentFunction · 0.70

Calls 1

opt_strFunction · 0.70

Tested by

no test coverage detected