zerovec::ule

Trait EqULE

Source
pub unsafe trait EqULE: AsULE { }
Expand description

An EqULE type is one 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.

Implementations on Foreign Types§

Source§

impl EqULE for bool

Source§

impl EqULE for f32

Source§

impl EqULE for f64

Source§

impl EqULE for i8

Source§

impl EqULE for i16

Source§

impl EqULE for i32

Source§

impl EqULE for i64

Source§

impl EqULE for i128

Source§

impl EqULE for u8

Source§

impl EqULE for u16

Source§

impl EqULE for u32

Source§

impl EqULE for u64

Source§

impl EqULE for u128

Source§

impl EqULE for NonZeroU8

Source§

impl<T: EqULE, const N: usize> EqULE for [T; N]

Implementors§