pub struct ConfigLoader {
defaults: BTreeMap<Os, ConfigFile>,
drop_ins: BTreeMap<Os, Vec<ConfigFile>>,
}Expand description
Loader for all valid default and drop-in configuration files.
Fields§
§defaults: BTreeMap<Os, ConfigFile>§drop_ins: BTreeMap<Os, Vec<ConfigFile>>Implementations§
Source§impl ConfigLoader
impl ConfigLoader
Sourcepub fn load(mode: LoadMode) -> Self
pub fn load(mode: LoadMode) -> Self
Creates a new ConfigLoader using a LoadMode.
If mode is LoadMode::System only system-wide locations are considered for the loading
of default and drop-in configuration files.
If mode is LoadMode::User, system-wide and locations of the calling user are
considered for the loading of default and drop-in configuration files.
Sourcepub fn defaults(&self) -> &BTreeMap<Os, ConfigFile>
pub fn defaults(&self) -> &BTreeMap<Os, ConfigFile>
Returns the map of OS default configuration files.
Trait Implementations§
Source§impl Debug for ConfigLoader
impl Debug for ConfigLoader
Source§impl From<ConfigLoader> for VoaConfig
impl From<ConfigLoader> for VoaConfig
Source§fn from(value: ConfigLoader) -> Self
fn from(value: ConfigLoader) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConfigLoader
impl RefUnwindSafe for ConfigLoader
impl Send for ConfigLoader
impl Sync for ConfigLoader
impl Unpin for ConfigLoader
impl UnwindSafe for ConfigLoader
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