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

Function require_str

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

Source from the content-addressed store, hash-verified

249}
250
251fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> {
252 opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'")))
253}
254
255fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> {
256 match fm.get(key) {

Callers 1

lift_intentFunction · 0.70

Calls 1

opt_strFunction · 0.70

Tested by

no test coverage detected