pub enum ConfigSource {
Defaults,
File(PathBuf),
EnvVars,
CliOverlay(Value),
}Expand description
One layer of the precedence stack.
Variants§
Defaults
Hard-coded defaults (always first).
File(PathBuf)
Config file at the given path. Format auto-detected from the
extension: .json, .yaml/.yml, .toml (YAML/TOML require
the config-loader feature). Missing / malformed is a hard
error; unknown fields are tolerated.
EnvVars
Read JSS_* env vars from std::env.
CliOverlay(Value)
Sprint 11 (row 121): highest-precedence CLI overlay, carried as a pre-built JSON value so the loader can deep-merge it without caring about the CLI parser.
Trait Implementations§
Source§impl Clone for ConfigSource
impl Clone for ConfigSource
Source§fn clone(&self) -> ConfigSource
fn clone(&self) -> ConfigSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConfigSource
impl RefUnwindSafe for ConfigSource
impl Send for ConfigSource
impl Sync for ConfigSource
impl Unpin for ConfigSource
impl UnsafeUnpin for ConfigSource
impl UnwindSafe for ConfigSource
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