Print configured settings
(os: &Os, format: OutputFormat)
| 79 | |
| 80 | /// Print configured settings |
| 81 | fn print_configured_settings(os: &Os, format: OutputFormat) -> Result<()> { |
| 82 | let settings = os.database.settings.map().clone(); |
| 83 | match format { |
| 84 | OutputFormat::Plain => { |
| 85 | for (key, value) in settings { |
| 86 | println!("{key} = {value}"); |
| 87 | } |
| 88 | }, |
| 89 | OutputFormat::Json => { |
| 90 | println!("{}", serde_json::to_string(&settings)?); |
| 91 | }, |
| 92 | OutputFormat::JsonPretty => { |
| 93 | println!("{}", serde_json::to_string_pretty(&settings)?); |
| 94 | }, |
| 95 | } |
| 96 | Ok(()) |
| 97 | } |
| 98 | |
| 99 | /// Print internal state table dump (hidden debug feature) |
| 100 | fn print_state_dump(os: &Os, format: OutputFormat) -> Result<()> { |