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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more