Trait zerovec::ule::EqULE

source ·
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.

Object Safety§

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§