Trait BytewiseEq

pub(crate) unsafe trait BytewiseEq<Rhs = Self>: ~const PartialEq<Rhs> + Sized

Types where == & != are equivalent to comparing their underlying bytes.

Importantly, this means no floating-point types, as those have different byte representations (like -0 and +0) which compare as the same. Since byte arrays are Eq, that implies that these types are probably also Eq, but that's not technically required to use this trait.

Rhs is de facto always Self, but the separate parameter is important to avoid the specializing impl repeats parameter error when consuming this.

Safety

Implementors