[][src]Trait const_layout::EqLayout

pub unsafe trait EqLayout<Rhs>: EqSize<Rhs> + EqAlign<Rhs> { }

EqLayout

Implemented for types with same mem::size_of and mem::align_of value

use core::alloc::Layout;
 
use const_layout::EqLayout;
 
fn must_have_same_layout<A: EqLayout<B>, B>(a: A, b: B) {
    assert_eq!(Layout::new::<A>(), Layout::new::<B>());
}

Implementors

Loading content...