pub unsafe trait Zeroable: Copy { }Expand description
Types for which every-zero bytes form a valid value.
Implementors must guarantee that 0u8 repeated over size_of::<Self>()
bytes is a valid initialized value. This is exactly the precondition needed
by AlignedVec::calloc.
§Safety
Implementing this trait for a type whose all-zero byte pattern is invalid
permits undefined behavior when calloc constructs that type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".