#[non_exhaustive]pub enum SourceLayer {
EnvVar(String),
ConfigFile {
path: PathBuf,
line: usize,
},
}Expand description
Which layer supplied a configuration value.
Used in LayeredError::Invalid to attribute a bad value to the exact
layer that produced it.
Only the layers this crate decodes values for appear here. A malformed CLI
argument is clap’s to report, and surfaces as LayeredError::Cli, so
there is no CliFlag variant to construct. This enum is #[non_exhaustive],
so --dump-config can add the remaining layers in a later version without a
breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EnvVar(String)
An environment variable, holding the variable’s name.
ConfigFile
A configuration file, holding its path and the 1-based line number.
Trait Implementations§
Source§impl Clone for SourceLayer
impl Clone for SourceLayer
Source§impl Debug for SourceLayer
impl Debug for SourceLayer
Source§impl Display for SourceLayer
impl Display for SourceLayer
impl Eq for SourceLayer
Source§impl Hash for SourceLayer
impl Hash for SourceLayer
Source§impl PartialEq for SourceLayer
impl PartialEq for SourceLayer
impl StructuralPartialEq for SourceLayer
Auto Trait Implementations§
impl Freeze for SourceLayer
impl RefUnwindSafe for SourceLayer
impl Send for SourceLayer
impl Sync for SourceLayer
impl Unpin for SourceLayer
impl UnsafeUnpin for SourceLayer
impl UnwindSafe for SourceLayer
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