pub unsafe trait Zeroable: Sized { }
Expand description
Types that can be safely “zero-initialized”.
§Safety
The type this trait is implemented on must:
- be inhabited (no
!
) - have a state where all bits are all zeroes
§Notes
Integral types (i32
, i64
, …), and some other type that fulfill the above safety
requirements have built-in impls that are provided by this crate.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.