Trait UnsignedBytewiseOrd

Source
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 as u8 and always be initialized.
  • For every x and y of this type, Ord(x, y) must return the same value as Ord::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.

Implementors§