MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / material_value

Function material_value

crates/openshell-server/src/provider_refresh.rs:668–677  ·  view source on GitHub ↗
(material: &HashMap<String, String>, keys: &[&str])

Source from the content-addressed store, hash-verified

666}
667
668fn material_value(material: &HashMap<String, String>, keys: &[&str]) -> Option<String> {
669 for key in keys {
670 if let Some(value) = material.get(*key).map(|value| value.trim())
671 && !value.is_empty()
672 {
673 return Some(value.to_string());
674 }
675 }
676 None
677}
678
679fn is_loopback_host(host: &str) -> bool {
680 matches!(host, "localhost" | "127.0.0.1" | "::1")

Callers 6

material_scopesFunction · 0.85
parse_material_i64Function · 0.85
oauth2_token_urlFunction · 0.85
required_materialFunction · 0.85

Calls 2

getMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected