get
gest config get: get a configuration value by dotted key path.struct Command
pub struct CommandGet a configuration value by dotted key path.
| Field | Type | Description |
|---|---|---|
key |
String | The configuration key (e.g. “storage.data_dir”, “log.level”). |
output |
json::Flags | The output mode: normal, --json, --quiet or --raw. |
Implements FromArgMatches, Args, Debug.
Command::call
pub async fn call(&self, context: &AppContext) -> Result<(), Error>Resolve key against the merged settings and print its value.
| Parameter | Type | Description |
|---|---|---|
context |
&AppContext | the application context: settings, store and current project |
| returns | Result<(), Error> | Ok(()) when the command succeeds, or the error that stopped it. |
fn display_toml_value
fn display_toml_value(value: &Value) -> StringFormat a TOML value for the human output: strings bare, everything else as TOML.
| Parameter | Type | Description |
|---|---|---|
value |
&Value | the value to show |
| returns | String | A string without quotes, or the TOML text of any other value. |
fn resolve_dotted_key
fn resolve_dotted_key<'a>(value: &'a Value, key: &str) -> Option<&'a Value>Walk a TOML value down a dotted key such as log.level.
| Parameter | Type | Description |
|---|---|---|
value |
&'a Value | the root of the settings, as TOML |
key |
&str | the dot-delimited key |
| returns | Option<&'a Value> | The value at key, or None when any part of the path is missing. |