pub struct ShellEnvironmentPolicy {
pub inherit: ShellEnvironmentPolicyInherit,
pub ignore_default_excludes: bool,
pub exclude: Vec<EnvironmentVariablePattern>,
pub set: HashMap<String, String>,
pub include_only: Vec<EnvironmentVariablePattern>,
pub use_profile: bool,
}Expand description
Deriving the env based on this policy works as follows:
- Create an initial map based on the
inheritpolicy. - If
ignore_default_excludesis false, filter the map using the default exclude pattern(s), which are:"*KEY*","*SECRET*", and"*TOKEN*". - If
excludeis not empty, filter the map using the provided patterns. - Insert any entries from
r#setinto the map. - If non-empty, filter the map using the
include_onlypatterns.
Fields§
§inherit: ShellEnvironmentPolicyInheritStarting point when building the environment.
ignore_default_excludes: boolTrue to skip the check to exclude default environment variables that contain “KEY”, “SECRET”, or “TOKEN” in their name. Defaults to true.
exclude: Vec<EnvironmentVariablePattern>Environment variable names to exclude from the environment.
set: HashMap<String, String>(key, value) pairs to insert in the environment.
include_only: Vec<EnvironmentVariablePattern>Environment variable names to retain in the environment.
use_profile: boolIf true, the shell profile will be used to run the command.
Trait Implementations§
Source§impl Clone for ShellEnvironmentPolicy
impl Clone for ShellEnvironmentPolicy
Source§fn clone(&self) -> ShellEnvironmentPolicy
fn clone(&self) -> ShellEnvironmentPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShellEnvironmentPolicy
impl Debug for ShellEnvironmentPolicy
Source§impl Default for ShellEnvironmentPolicy
impl Default for ShellEnvironmentPolicy
Source§impl PartialEq for ShellEnvironmentPolicy
impl PartialEq for ShellEnvironmentPolicy
impl StructuralPartialEq for ShellEnvironmentPolicy
Auto Trait Implementations§
impl Freeze for ShellEnvironmentPolicy
impl RefUnwindSafe for ShellEnvironmentPolicy
impl Send for ShellEnvironmentPolicy
impl Sync for ShellEnvironmentPolicy
impl Unpin for ShellEnvironmentPolicy
impl UnsafeUnpin for ShellEnvironmentPolicy
impl UnwindSafe for ShellEnvironmentPolicy
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more