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

Function get_object_u64

crates/openshell-supervisor-network/src/l7/mod.rs:321–330  ·  view source on GitHub ↗
(val: &regorus::Value, key: &str)

Source from the content-addressed store, hash-verified

319}
320
321fn get_object_u64(val: &regorus::Value, key: &str) -> Option<u64> {
322 let key_val = regorus::Value::String(key.into());
323 match val {
324 regorus::Value::Object(map) => match map.get(&key_val) {
325 Some(regorus::Value::Number(n)) => n.as_u64(),
326 _ => None,
327 },
328 _ => None,
329 }
330}
331
332/// Extract a string value from a regorus object.
333fn get_object_str(val: &regorus::Value, key: &str) -> Option<String> {

Callers 1

parse_l7_configFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected