Crate pakr_assert_size

Source

Attribute Macrosยง

assert_size
The attribute #[assert_size(USIZE)] performs compile-time check, if the structure it is attached to has the exact size in bytes.
assert_size_fits
The attribute #[assert_size_fits(USIZE)] performs compile-time check, if the structure it is attached is not bigger than given amount of bytes.