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

Function vault_frontmatter_string

atomic-repository/src/repository/vault.rs:1126–1135  ·  view source on GitHub ↗
(entry: &VaultEntry, key: &str)

Source from the content-addressed store, hash-verified

1124}
1125
1126fn vault_frontmatter_string(entry: &VaultEntry, key: &str) -> Option<String> {
1127 serde_json::from_str::<serde_json::Value>(&entry.frontmatter_json)
1128 .ok()
1129 .and_then(|value| {
1130 value
1131 .get(key)
1132 .and_then(serde_json::Value::as_str)
1133 .map(str::to_string)
1134 })
1135}
1136
1137/// Update the manifest when a vault entry is stored.
1138fn update_manifest_for_store(

Calls 2

getMethod · 0.65
okMethod · 0.45

Tested by

no test coverage detected