Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/RPC/Configuration/
ConfigurationService.rs

1//! Configuration read/write service.
2
3use std::collections::HashMap;
4
5pub struct Struct {
6	config:HashMap<String, serde_json::Value>,
7}
8
9impl Struct {
10	pub fn new() -> Self { Self { config:HashMap::new() } }
11
12	pub fn get(&self, Key:&str) -> Option<&serde_json::Value> { self.config.get(Key) }
13
14	pub fn set(&mut self, Key:String, Value:serde_json::Value) { self.config.insert(Key, Value); }
15}
16
17impl Default for Struct {
18	fn default() -> Self { Self::new() }
19}