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

Function display_setting_value

crates/openshell-tui/src/app.rs:204–212  ·  view source on GitHub ↗

Format a proto `SettingValue` for display.

(value: &Option<setting_value::Value>)

Source from the content-addressed store, hash-verified

202
203/// Format a proto `SettingValue` for display.
204pub fn display_setting_value(value: &Option<setting_value::Value>) -> String {
205 match value {
206 None => "<unset>".to_string(),
207 Some(setting_value::Value::StringValue(v)) => v.clone(),
208 Some(setting_value::Value::BoolValue(v)) => v.to_string(),
209 Some(setting_value::Value::IntValue(v)) => v.to_string(),
210 Some(setting_value::Value::BytesValue(_)) => "<bytes>".to_string(),
211 }
212}
213
214// ---------------------------------------------------------------------------
215// Gateway entry

Callers 1

display_valueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected