pub enum EnvValue {
String(String),
Number(f64),
Boolean(bool),
}Expand description
Environment variable values are always strings, but GitHub Actions allows users to configure them as various native YAML types before internal stringification.
This type also gets used for other places where GitHub Actions contextually reinterprets a YAML value as a string, e.g. trigger input values.
Variants§
Implementations§
Source§impl EnvValue
impl EnvValue
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns whether the original value was empty.
For example, foo: and foo: '' would both return true.
Sourcepub fn csharp_trueish(&self) -> bool
pub fn csharp_trueish(&self) -> bool
Returns whether this EnvValue is a “trueish” value
per C#’s Boolean.TryParse.
This follows the semantics of C#’s Boolean.TryParse, where
the case-insensitive string “true” is considered true, but
“1”, “yes”, etc. are not.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EnvValue
impl<'de> Deserialize<'de> for EnvValue
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 EnvValue
Auto Trait Implementations§
impl Freeze for EnvValue
impl RefUnwindSafe for EnvValue
impl Send for EnvValue
impl Sync for EnvValue
impl Unpin for EnvValue
impl UnwindSafe for EnvValue
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