pub struct Settings {
pub credit: bool,
pub env_allow: Vec<String>,
pub env_deny: Vec<String>,
pub gate_pct: f64,
}Expand description
Every setting, resolved.
PartialEq but not Eq: a float setting has no total equality.
Fields§
§credit: bool§env_allow: Vec<String>§env_deny: Vec<String>§gate_pct: f64Implementations§
Source§impl Settings
impl Settings
Sourcepub fn resolve(
cli: &Overrides,
config: &SettingsSections,
env: EnvLookup<'_>,
) -> Self
pub fn resolve( cli: &Overrides, config: &SettingsSections, env: EnvLookup<'_>, ) -> Self
Resolve every setting from the sources declared in settings.toml.
Sourcepub fn from_process(cli: &Overrides, config: &SettingsSections) -> Self
pub fn from_process(cli: &Overrides, config: &SettingsSections) -> Self
Resolve against the real process environment.
Sourcepub fn display_value(&self, name: &str) -> Option<String>
pub fn display_value(&self, name: &str) -> Option<String>
The value of a setting, by its registry name.
Exists so display code cannot silently omit a setting: SETTINGS is
generated, so a new entry appears in tak settings whether or not
anything can produce its value. A test asserts this returns Some for
every registry entry, which turns “added a setting, forgot the
accessor” into a build failure instead of a blank row.
Sourcepub fn scrubbed_env(&self) -> impl Iterator<Item = &str>
pub fn scrubbed_env(&self) -> impl Iterator<Item = &str>
Variables to remove from a benchmark subject: denied, less allowed.
Allow subtracts from deny rather than sitting beside it, so opting one variable back in does not mean restating the whole default list.