Struct abscissa::ConfigReader [−][src]
pub struct ConfigReader<C: 'static + GlobalConfig>(_);
Wrapper around a RwLockReadGuard
for reading global configuration data
from global static values defined by the init_config!
macro.
Methods
impl<C: GlobalConfig> ConfigReader<C>
[src]
impl<C: GlobalConfig> ConfigReader<C>
pub fn new(config_guard: RwLockReadGuard<'static, Option<C>>) -> Self
[src]
pub fn new(config_guard: RwLockReadGuard<'static, Option<C>>) -> Self
Obtain a read-only handle to the inner configuration from an RwLock
.
This is intended to be used with a global static configuration defined
by the init_config!
macro.
Panics if the configuration has not been loaded.
Trait Implementations
impl<C: GlobalConfig> Deref for ConfigReader<C>
[src]
impl<C: GlobalConfig> Deref for ConfigReader<C>
Auto Trait Implementations
impl<C> !Send for ConfigReader<C>
impl<C> !Send for ConfigReader<C>
impl<C> Sync for ConfigReader<C> where
C: Sync,
impl<C> Sync for ConfigReader<C> where
C: Sync,