pub struct Config {}Expand description
Config
Implementations§
Source§impl Config
impl Config
pub fn get() -> Arc<ConfigModel>
Sourcepub fn try_get() -> Option<Arc<ConfigModel>>
pub fn try_get() -> Option<Arc<ConfigModel>>
Return the config if initialized, otherwise None.
Sourcepub fn init_from_toml(config_str: &str) -> Result<Arc<ConfigModel>, Error>
pub fn init_from_toml(config_str: &str) -> Result<Arc<ConfigModel>, Error>
Initialize the global configuration from a TOML string. return the config as it is read at build time