#[non_exhaustive]pub struct EnvVar {
pub name: String,
pub values: Option<Values>,
/* private fields */
}Expand description
EnvVar represents an environment variable present in a Container.
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.name: StringRequired. Name of the environment variable. Must not exceed 32768 characters.
values: Option<Values>Implementations§
Source§impl EnvVar
impl EnvVar
pub fn new() -> Self
Sourcepub fn set_values<T: Into<Option<Values>>>(self, v: T) -> Self
pub fn set_values<T: Into<Option<Values>>>(self, v: T) -> Self
Sourcepub fn value(&self) -> Option<&String>
pub fn value(&self) -> Option<&String>
The value of values
if it holds a Value, None if the field is not set or
holds a different branch.
Sourcepub fn value_source(&self) -> Option<&Box<EnvVarSource>>
pub fn value_source(&self) -> Option<&Box<EnvVarSource>>
The value of values
if it holds a ValueSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_value_source<T: Into<Box<EnvVarSource>>>(self, v: T) -> Self
pub fn set_value_source<T: Into<Box<EnvVarSource>>>(self, v: T) -> Self
Sets the value of values
to hold a ValueSource.
Note that all the setters affecting values are
mutually exclusive.
§Example
ⓘ
use google_cloud_run_v2::model::EnvVarSource;
let x = EnvVar::new().set_value_source(EnvVarSource::default()/* use setters */);
assert!(x.value_source().is_some());
assert!(x.value().is_none());Trait Implementations§
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