pub struct Env { /* private fields */ }Implementations§
Source§impl Env
impl Env
Sourcepub fn load(path: &Path) -> Result<Self>
pub fn load(path: &Path) -> Result<Self>
Read .run/.env. A missing file is not an error: the defaults baked
into docker-compose.yml still apply.
pub fn get(&self, key: &str) -> Option<&str>
pub fn get_or<'a>(&'a self, key: &str, fallback: &'a str) -> &'a str
pub fn set(&mut self, key: &str, value: impl Into<String>)
pub fn is_true(&self, key: &str, fallback: bool) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&String, &String)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Env
impl RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnsafeUnpin for Env
impl UnwindSafe for Env
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