macro_rules! hopper_assert_compatible {
($old:ty, $new:ty, append) => { ... };
($old:ty, $new:ty, differs) => { ... };
}Expand description
Assert that two layout versions have compatible fingerprints.
Fails at compile time if the assertion doesn’t hold. Use this in tests and CI to catch accidental schema breaks.
ⓘ
// Assert V2 is a strict superset of V1 (append-only):
hopper_assert_compatible!(VaultV1, VaultV2, append);
// Assert two layouts have different fingerprints (version bump required):
hopper_assert_compatible!(VaultV1, VaultV2, differs);