pub unsafe trait EqULE: AsULE { }
Expand description
A type whose byte sequence equals the byte sequence of its ULE type on little-endian platforms.
This enables certain performance optimizations, such as
ZeroVec::try_from_slice
.
§Implementation safety
This trait is safe to implement if the type’s ULE (as defined by impl
AsULE
for T
)
has an equal byte sequence as the type itself on little-endian platforms; i.e., one where
*const T
can be cast to a valid *const T::ULE
.
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.