pub struct VoaConfig {
defaults: TechnologySettings,
oses: BTreeMap<Os, TechnologySettings>,
contexts: BTreeMap<OsPurposeContext, TechnologySettings>,
}Expand description
The unified configuration view for a system.
Contains the fully resolved OS-level and context-level technology settings.
Fields§
§defaults: TechnologySettingsThe built-in default settings for all supported backend technologies.
oses: BTreeMap<Os, TechnologySettings>Per Os settings for all supported backend technologies.
contexts: BTreeMap<OsPurposeContext, TechnologySettings>Implementations§
Source§impl VoaConfig
impl VoaConfig
Sourcepub fn load() -> Self
pub fn load() -> Self
Creates a new VoaConfig by loading all available configuration files from system-wide
and possible user-specific locations.
§Note
Depending on the effective uid of the calling user, the configurations are loaded only from system mode locations (i.e. uid < 1000), or from system mode and user mode locations (i.e. uid >= 1000).
Sourcepub fn settings_for_os_or_default(&self, os: &Os) -> &TechnologySettings
pub fn settings_for_os_or_default(&self, os: &Os) -> &TechnologySettings
Returns the technology settings for an OS, or the built-in default.
Sourcepub fn settings_for_context_or_default(
&self,
os: &Os,
purpose: &Purpose,
context: &Context,
) -> &TechnologySettings
pub fn settings_for_context_or_default( &self, os: &Os, purpose: &Purpose, context: &Context, ) -> &TechnologySettings
Returns the technology settings for a specific context, an OS or the built-in default.
Sourcepub fn oses(&self) -> &BTreeMap<Os, TechnologySettings>
pub fn oses(&self) -> &BTreeMap<Os, TechnologySettings>
Returns a reference to the map of Os and TechnologySettings.
Sourcepub fn contexts(&self) -> &BTreeMap<OsPurposeContext, TechnologySettings>
pub fn contexts(&self) -> &BTreeMap<OsPurposeContext, TechnologySettings>
Returns a reference to the map of OsPurposeContext and TechnologySettings.