pub unsafe trait SerializeConst: Sized {
const MEMORY_LAYOUT: Layout;
const _ASSERT: () = _;
}Expand description
A trait for types that can be serialized and deserialized in const.
§Safety
The layout must accurately describe the memory layout of the type
Required Associated Constants§
Sourceconst MEMORY_LAYOUT: Layout
const MEMORY_LAYOUT: Layout
The memory layout of the type. This type must have plain old data; no pointers or references.
Provided Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".