pub struct Settings {
pub env_allow: Vec<String>,
pub env_deny: Vec<String>,
}Expand description
Every setting, resolved.
Fields§
§env_allow: Vec<String>§env_deny: Vec<String>Implementations§
Source§impl Settings
impl Settings
Sourcepub fn resolve(
cli: &Overrides,
config: Option<&EnvSection>,
env: EnvLookup<'_>,
) -> Self
pub fn resolve( cli: &Overrides, config: Option<&EnvSection>, env: EnvLookup<'_>, ) -> Self
Resolve every setting from the sources declared in settings.toml.
Sourcepub fn from_process(cli: &Overrides, config: Option<&EnvSection>) -> Self
pub fn from_process(cli: &Overrides, config: Option<&EnvSection>) -> Self
Resolve against the real process environment.
Sourcepub fn get(&self, name: &str) -> Option<&Vec<String>>
pub fn get(&self, name: &str) -> Option<&Vec<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.
Trait Implementations§
impl Eq for Settings
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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