pub struct Environment<M = ImplicitIndex> {
pub name: EnvironmentName,
pub index: EnvironmentIndex,
/* private fields */
}Fields§
§name: EnvironmentName§index: EnvironmentIndexImplementations§
Source§impl<M> Environment<M>
impl<M> Environment<M>
Source§impl Environment<ImplicitIndex>
impl Environment<ImplicitIndex>
Sourcepub fn into_explicit(self) -> Environment<ExplicitIndex>
pub fn into_explicit(self) -> Environment<ExplicitIndex>
Turn an non explicit environment into an explicit one. An explicit environment will always append the index number to its display names. Whereas a non-explicit one (default) only append the index if it is different than 1.
Source§impl Environment<ExplicitIndex>
impl Environment<ExplicitIndex>
pub fn into_implicit(self) -> Environment<ImplicitIndex>
Source§impl<M: IndexStyle> Environment<M>
impl<M: IndexStyle> Environment<M>
pub fn long(&self) -> String
pub fn medium(&self) -> String
pub fn short(&self) -> String
Sourcepub fn get_dotenv_filename(&self) -> String
pub fn get_dotenv_filename(&self) -> String
Backward-compatible helper for env-specific base filename.
Sourcepub fn get_dotenv_secrets_filename(&self) -> String
pub fn get_dotenv_secrets_filename(&self) -> String
Backward-compatible helper for env-specific secrets filename.
Sourcepub fn get_env_files(&self) -> Vec<String>
pub fn get_env_files(&self) -> Vec<String>
All possible .env files for this environment, by family. Order matters: later files override earlier ones.
Sourcepub fn merge_env_files(&self) -> Result<PathBuf>
pub fn merge_env_files(&self) -> Result<PathBuf>
Merge all the .env files of the environment with all variable expanded
Trait Implementations§
Source§impl<M: Clone> Clone for Environment<M>
impl<M: Clone> Clone for Environment<M>
Source§fn clone(&self) -> Environment<M>
fn clone(&self) -> Environment<M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<M: Debug> Debug for Environment<M>
impl<M: Debug> Debug for Environment<M>
Source§impl<M: Default> Default for Environment<M>
impl<M: Default> Default for Environment<M>
Source§fn default() -> Environment<M>
fn default() -> Environment<M>
Returns the “default value” for a type. Read more
Source§impl<M: IndexStyle> Display for Environment<M>
impl<M: IndexStyle> Display for Environment<M>
Source§impl<M: PartialEq> PartialEq for Environment<M>
impl<M: PartialEq> PartialEq for Environment<M>
impl<M> StructuralPartialEq for Environment<M>
Auto Trait Implementations§
impl<M> Freeze for Environment<M>
impl<M> RefUnwindSafe for Environment<M>where
M: RefUnwindSafe,
impl<M> Send for Environment<M>where
M: Send,
impl<M> Sync for Environment<M>where
M: Sync,
impl<M> Unpin for Environment<M>where
M: Unpin,
impl<M> UnwindSafe for Environment<M>where
M: UnwindSafe,
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