pub enum If {
Bool(bool),
Expr(String),
}Expand description
An if: condition in a job or action definition.
These are either booleans or bare (i.e. non-curly) expressions.
GitHub Actions also accepts bare numeric values in if: conditions
(e.g. if: 0, if: 0xf, if: 1.5). These are coerced to booleans
during deserialization following Actions’ truthiness rules:
0, 0.0, and NaN are falsy; everything else is truthy.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for If
impl<'de> Deserialize<'de> for If
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 If
Auto Trait Implementations§
impl Freeze for If
impl RefUnwindSafe for If
impl Send for If
impl Sync for If
impl Unpin for If
impl UnsafeUnpin for If
impl UnwindSafe for If
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