pub enum Source {
Default {
rule: &'static str,
},
Derived {
from: &'static str,
},
ConfigFile {
file: PathBuf,
key: &'static str,
},
Environment {
name: &'static str,
},
Given {
origin: Origin,
},
}Expand description
The input that gave a value.
Variants§
Default
A built-in default. rule names the default.
Derived
A value that follows from another decision or input. from names it.
ConfigFile
A key of the config file. file is the top file of the extends
chain, because the merge of the chain keeps no file per key.
Fields
Environment
An environment variable.
Given
A value that the caller gives.
Implementations§
Source§impl Source
impl Source
Sourcepub const fn layer(&self) -> Layer
pub const fn layer(&self) -> Layer
The input layer of this source. Source::Default and
Source::Derived are in Layer::Default.
Trait Implementations§
impl Eq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Forget for Source
impl Freeze for Source
impl Move for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.