ftd_rt/
condition.rs

1#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize)]
2pub struct Condition {
3    pub variable: String,
4    pub value: String,
5}
6
7impl Condition {
8    pub fn is_true(&self, data: &ftd_rt::DataDependenciesMap) -> bool {
9        if let Some(ftd_rt::Data { value: v, .. }) = data.get(self.variable.as_str()) {
10            return v == &self.value;
11        }
12
13        true
14    }
15}