Skip to main content

assert_compatible

Macro assert_compatible 

Source
macro_rules! assert_compatible {
    ($new:ty : $old:ty) => { ... };
}
Expand description

Statically assert that $new is a layout-compatible, append-only extension of $old (see Manifest::extends). Fails compilation if a carried field was moved, resized or dropped — catching wire-format breakage before runtime.

ix_schema::assert_compatible!(EventV2 : EventV1);