pub struct EnvVar {
pub name: String,
pub value: Option<String>,
pub value_from: Option<EnvVarSource>,
}
Expand description
EnvVar represents an environment variable present in a Container.
Fields§
§name: String
Name of the environment variable. Must be a C_IDENTIFIER.
value: Option<String>
Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. “$$(VAR_NAME)” will produce the string literal “$(VAR_NAME)”. Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to “”.
value_from: Option<EnvVarSource>
Source for the environment variable’s value. Cannot be used if value is not empty.
Trait Implementations§
source§impl<'de> Deserialize<'de> for EnvVar
impl<'de> Deserialize<'de> for EnvVar
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
impl StructuralPartialEq for EnvVar
Auto Trait Implementations§
impl Freeze for EnvVar
impl RefUnwindSafe for EnvVar
impl Send for EnvVar
impl Sync for EnvVar
impl Unpin for EnvVar
impl UnwindSafe for EnvVar
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)