datex_core/values/value/value_classification/equality.rs
1use crate::traits::{structural_eq::StructuralEq, value_eq::ValueEq};
2
3impl ValueEq for super::ValueClassification {
4 fn value_eq(&self, other: &Self) -> bool {
5 self.entity_type == other.entity_type
6 && self.impls == other.impls
7 && self.tag == other.tag
8 }
9}
10
11impl StructuralEq for super::ValueClassification {
12 fn structural_eq(&self, other: &Self) -> bool {
13 // TODO is it different for tags and entities?
14 // MyStruct::VariantA(1, 2) == MyStruct::VariantB(1, 2) ?
15 // [1,2,3] + $123 == [1,2,3] + $456 ?
16
17 self.value_eq(other)
18 }
19}