datex_core/values/value/equality.rs
1use crate::{
2 traits::{structural_eq::StructuralEq, value_eq::ValueEq},
3 values::value::Value,
4};
5
6/// Two values are structurally equal, if their inner values are structurally equal, regardless
7/// of the actual_type of the values
8impl StructuralEq for Value {
9 fn structural_eq(&self, other: &Self) -> bool {
10 self.inner.structural_eq(&other.inner)
11 }
12}
13
14/// Value equality corresponds to partial equality:
15/// Both type and inner value are the same
16impl ValueEq for Value {
17 fn value_eq(&self, other: &Self) -> bool {
18 self == other
19 }
20}