MCPcopy Create free account
hub / github.com/AI45Lab/Code / yaml_get

Function yaml_get

core/src/subagent.rs:781–785  ·  view source on GitHub ↗
(value: &'a serde_yaml::Value, key: &str)

Source from the content-addressed store, hash-verified

779}
780
781fn yaml_get<'a>(value: &'a serde_yaml::Value, key: &str) -> Option<&'a serde_yaml::Value> {
782 value
783 .as_mapping()
784 .and_then(|mapping| mapping.get(serde_yaml::Value::String(key.to_string())))
785}
786
787fn yaml_get_any<'a>(value: &'a serde_yaml::Value, keys: &[&str]) -> Option<&'a serde_yaml::Value> {
788 keys.iter().find_map(|key| yaml_get(value, key))

Callers 1

yaml_get_anyFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected