pub struct EnvFiles {
pub base: Option<PathBuf>,
pub override_file: Option<PathBuf>,
}Expand description
Environment files selected by the application.
Missing files are ignored so production deployments can use process-level variables exclusively. The optional override replaces base and process values in an immutable configuration snapshot. The OS process environment is untouched.
Fields§
§base: Option<PathBuf>Base dotenv file.
override_file: Option<PathBuf>Local or deployment-specific override file.
Implementations§
Source§impl EnvFiles
impl EnvFiles
Sourcepub fn load(&self) -> Result<EnvLoad>
pub fn load(&self) -> Result<EnvLoad>
Atomically installs one immutable startup configuration.
Read it through this module’s accessors and pass vars_os to child
processes. Repeating the same selection returns the existing report.
Selecting different files after successful initialization returns an error.
A failed load leaves the resolver and the process environment unchanged.
Trait Implementations§
impl Eq for EnvFiles
impl StructuralPartialEq for EnvFiles
Auto Trait Implementations§
impl Freeze for EnvFiles
impl RefUnwindSafe for EnvFiles
impl Send for EnvFiles
impl Sync for EnvFiles
impl Unpin for EnvFiles
impl UnsafeUnpin for EnvFiles
impl UnwindSafe for EnvFiles
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