From 66f2c0fdc96779bade972411cf0ac49ff018ee31 Mon Sep 17 00:00:00 2001 From: Ash Beitz <8304894+ashbeitz@users.noreply.github.com> Date: Sun, 5 May 2024 17:25:42 -0700 Subject: [PATCH] Digital Twin Graph --- .../src/digital_twin_graph_config.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/module/digital_twin_graph/src/digital_twin_graph_config.rs b/core/module/digital_twin_graph/src/digital_twin_graph_config.rs index 6abc51b6..3ce9f3f5 100644 --- a/core/module/digital_twin_graph/src/digital_twin_graph_config.rs +++ b/core/module/digital_twin_graph/src/digital_twin_graph_config.rs @@ -7,17 +7,28 @@ use serde_derive::Deserialize; const DEFAULT_CONFIG_FILENAME: &str = "digital_twin_graph_settings"; +/// The settings for the digital twin graph service. #[derive(Debug, Deserialize)] pub struct Settings { + /// The authority (address + optional port in the format "
[:]") for the Ibeji application server. pub base_authority: String, } /// Load the settings. +/// The settings are loaded from the default config file name. +/// +/// # Returns +/// The settings. pub fn load_settings() -> Settings { utils::load_settings(DEFAULT_CONFIG_FILENAME).unwrap() } -/// Load the settings. +/// Load the settings with the specified config file name. +/// +/// # Arguments +/// * `config_filename` - The name of the config file. +/// # Returns +/// The settings. pub fn load_settings_with_config_filename(config_filename: &str) -> Settings { utils::load_settings(config_filename).unwrap() }