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

Function require_str

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

Source from the content-addressed store, hash-verified

266}
267
268fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> {
269 opt_str(fm, key).ok_or_else(|| CanonicalError::Lift(format!("frontmatter missing '{key}'")))
270}
271
272fn opt_str(fm: &Map<String, Value>, key: &str) -> Option<String> {
273 match fm.get(key) {

Callers 1

lift_intentFunction · 0.70

Calls 1

opt_strFunction · 0.70

Tested by

no test coverage detected