#[assert_size]
Attribute macro that causes a compile-time error if the struct’s size_of is not exactly N bytes.
size_of
N
Useful for locking down a struct’s total size against accidental growth.
#[padlock::assert_size(64)] struct CacheLine { data: [u8; 64], }