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

Function object_string

e2e/rust/tests/gpu/device_selection.rs:42–47  ·  view source on GitHub ↗
(object: &'a Map<String, Value>, key: &str)

Source from the content-addressed store, hash-verified

40}
41
42fn object_string<'a>(object: &'a Map<String, Value>, key: &str) -> Option<&'a str> {
43 object
44 .get(key)
45 .or_else(|| object.get(&key.to_ascii_lowercase()))
46 .and_then(Value::as_str)
47}
48
49fn discovered_devices_array(info: &Value) -> Option<&Vec<Value>> {
50 info.get("DiscoveredDevices")

Calls 1

getMethod · 0.45

Tested by

no test coverage detected