pub struct EnvSource { /* private fields */ }Expand description
Reads config from environment variables with a given prefix.
PREFIX_WINDOW__WIDTH=1024 → { "window": { "width": 1024 } }
Double-underscore (__) is the nested key separator.
Trait Implementations§
Source§impl Source for EnvSource
impl Source for EnvSource
Source§fn with_app_name(self, name: &str) -> Self
fn with_app_name(self, name: &str) -> Self
Inject the application name derived from
crate::config::ConfigSchema::APP_NAME. Read moreSource§fn collect(&self) -> Result<ConfigValue, SourceError>
fn collect(&self) -> Result<ConfigValue, SourceError>
Collect config values from this source. Read more
Auto Trait Implementations§
impl Freeze for EnvSource
impl RefUnwindSafe for EnvSource
impl Send for EnvSource
impl Sync for EnvSource
impl Unpin for EnvSource
impl UnsafeUnpin for EnvSource
impl UnwindSafe for EnvSource
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