gh_workflow/
expression.rs

1//!
2//! Expression types for GitHub workflow conditions and evaluations.
3
4use serde::{Deserialize, Serialize};
5
6/// Represents an expression used in conditions.
7#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq)]
8#[serde(transparent)]
9pub struct Expression(pub String);
10
11impl Expression {
12    /// Creates a new `Expression` from a string.
13    pub fn new<T: ToString>(expr: T) -> Self {
14        Self(expr.to_string())
15    }
16}