datex-core 0.0.13

The DATEX Core Rust implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub trait ValueEq {
    /// Check if two values are exactly equal, including the type.
    fn value_eq(&self, other: &Self) -> bool;
}

pub macro assert_value_eq {
    ($left_val:expr, $right_val:expr $(,)?) => {
        if !$left_val.value_eq(&$right_val) {
            panic!(
                "value equality assertion failed: `(left === right)`\n  left: `{:?}`,\n right: `{:?}`",
                $left_val, $right_val
            );
        }
    }
}