pub enum Provenance {
Default,
Explicit,
}Expand description
Whether a configuration value was set explicitly, or merely defaulted.
A configuration source generally supplies every setting it knows about, including settings nobody configured, so a value on its own cannot say whether anything set it. A setting whose meaning depends on that question needs the distinction; a setting that only needs an effective value can ignore it.
Variants§
Default
Nothing set the setting, so it holds a default.
This is the provenance of a value the model defaulted itself and of a value a source supplied from its own defaults.
Explicit
Some input set this value: a configuration file, an environment variable, remote configuration, and so on.
Trait Implementations§
Source§impl Clone for Provenance
impl Clone for Provenance
Source§fn clone(&self) -> Provenance
fn clone(&self) -> Provenance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Provenance
impl Debug for Provenance
Source§impl Default for Provenance
impl Default for Provenance
Source§fn default() -> Provenance
fn default() -> Provenance
Returns the “default value” for a type. Read more
Source§impl PartialEq for Provenance
impl PartialEq for Provenance
impl Copy for Provenance
impl Eq for Provenance
impl StructuralPartialEq for Provenance
Auto Trait Implementations§
impl Freeze for Provenance
impl RefUnwindSafe for Provenance
impl Send for Provenance
impl Sync for Provenance
impl Unpin for Provenance
impl UnwindSafe for Provenance
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