[−][src]Trait web_glitz::pipeline::interface_block::StableRepr
Marker trait for types that are guaranteed have a stable memory representation across builds.
This trait may be unsafely implemented on types to mark them as having a stable representation.
use web_glitz::pipeline::interface_block::StableRepr; #[repr(C, align(16))] struct MyType { member: f32 } unsafe impl StableRepr for MyType {}
This trait is required to be implemented for any type that wishes to implement InterfaceBlock or InterfaceBlockComponent.
This trait is already implemented for any type marked with std140::ReprStd140, including any
user-defined structs marked with the #[std140::repr_std140] attribute.
Unsafe
This trait should only be implemented on types which have a representation that is guaranteed
to be stable across builds. By default, the Rust compiler gives no guarantees on the memory
layout of non-primitive types such as (user-defined) structs or tuples, which allows the
compiler to optimize their memory layout. However, the compiler may be instructed to use a
well-defined memory layout with the #[repr] attribute, e.g. #[repr(C)].
Implementors
impl<T> StableRepr for T where
T: ReprStd140, [src]
T: ReprStd140,