#[non_exhaustive]pub struct EnvConfig {
pub inherit_parent: bool,
pub set: HashMap<String, String>,
pub unset: Vec<String>,
}Expand description
Controls environment variable inheritance for sandboxed processes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.inherit_parent: boolInherit all environment variables from the parent process.
true by default — preserves PATH, HOME, dotfile locations, tool
configurations, and editor settings. Set to false for a clean
environment.
set: HashMap<String, String>Additional variables to set. Merged after parent env when
inherit_parent = true; these values take precedence.
unset: Vec<String>Variable names to remove from the inherited set.
Example: ["AWS_SECRET_ACCESS_KEY", "GITHUB_TOKEN"]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EnvConfig
impl<'de> Deserialize<'de> for EnvConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EnvConfig
impl RefUnwindSafe for EnvConfig
impl Send for EnvConfig
impl Sync for EnvConfig
impl Unpin for EnvConfig
impl UnsafeUnpin for EnvConfig
impl UnwindSafe for EnvConfig
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