Returns a tuple that can be used to compare instances of this struct. This is done because this struct uses HashSet, so it can't derive from the Hash trait. The use case for comparing `SupportedCondition` instances is rare, so `BTreeSet` seems to be an overkill.
(&self)
| 32 | /// `SupportedCondition` instances is rare, so `BTreeSet` seems to |
| 33 | /// be an overkill. |
| 34 | fn comparable_encoding(&self) -> (&str, Vec<&str>) { |
| 35 | let mut field_names = self.field_names().into_iter().collect::<Vec<&str>>(); |
| 36 | field_names.sort(); |
| 37 | let kind = match self { |
| 38 | Self::And(_) => "and", |
| 39 | Self::Or(_) => "or", |
| 40 | }; |
| 41 | (kind, field_names) |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | #[derive(Debug, Clone, Serialize, Deserialize)] |