protocol SameLayoutAs<T> { ... }

Matches types that are layout-compatible with T (same size and alignment)