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

Function bool_setting_enabled

crates/openshell-server/src/grpc/policy.rs:1370–1378  ·  view source on GitHub ↗
(settings: &StoredSettings, key: &str)

Source from the content-addressed store, hash-verified

1368}
1369
1370fn bool_setting_enabled(settings: &StoredSettings, key: &str) -> Result<bool, Status> {
1371 match settings.settings.get(key) {
1372 None => Ok(false),
1373 Some(StoredSettingValue::Bool(value)) => Ok(*value),
1374 Some(_) => Err(Status::internal(format!(
1375 "setting '{key}' has invalid value type; expected bool"
1376 ))),
1377 }
1378}
1379
1380pub(super) async fn handle_get_gateway_config(
1381 state: &Arc<ServerState>,

Callers 2

Calls 1

getMethod · 0.45

Tested by

no test coverage detected