unsafe trait UnsignedBytewiseOrd: Ord { }Expand description
Marks that a type should be treated as an unsigned byte for comparisons.
§Safety
- The type must be readable as an
u8, meaning it has to have the same layout asu8and always be initialized. - For every
xandyof this type,Ord(x, y)must return the same value asOrd::cmp(transmute::<_, u8>(x), transmute::<_, u8>(y)).
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.