Trait Cmp
pub trait Cmp<Rhs = Self>
A type operator for comparing Self and Rhs. It provides a similar functionality to
the function
core::cmp::Ord::cmp
but for types.
Example
use ;
use Ordering;
assert_eq!;
assert_eq!;
assert_eq!;
Associated Types
type Output;The result of the comparison. It should only ever be one of
Greater,Less, orEqual.
Implementors
impl Cmp for B0impl Cmp for B1impl Cmp for UTermimpl Cmp for Z0impl Cmp<B0> for B1impl Cmp<B1> for B0impl<Nl: Unsigned + NonZero, Nr: Cmp<Nl> + Unsigned + NonZero> Cmp<NInt<Nr>> for NInt<Nl>impl<P: Unsigned + NonZero, N: Unsigned + NonZero> Cmp<NInt<N>> for PInt<P>impl<P: Unsigned + NonZero, N: Unsigned + NonZero> Cmp<PInt<P>> for NInt<N>impl<Pl: Cmp<Pr> + Unsigned + NonZero, Pr: Unsigned + NonZero> Cmp<PInt<Pr>> for PInt<Pl>impl<U: Unsigned + NonZero> Cmp<NInt<U>> for Z0impl<U: Unsigned + NonZero> Cmp<PInt<U>> for Z0impl<U: Unsigned + NonZero> Cmp<Z0> for NInt<U>impl<U: Unsigned + NonZero> Cmp<Z0> for PInt<U>impl<U: Unsigned, B: Bit> Cmp<UInt<U, B>> for UTermimpl<U: Unsigned, B: Bit> Cmp<UTerm> for UInt<U, B>impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B0>> for UInt<Ul, B0> where Ul: PrivateCmp<Ur, Equal> + Unsigned,impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B0>> for UInt<Ul, B1> where Ul: PrivateCmp<Ur, Greater> + Unsigned,impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B1>> for UInt<Ul, B0> where Ul: PrivateCmp<Ur, Less> + Unsigned,impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B1>> for UInt<Ul, B1> where Ul: PrivateCmp<Ur, Equal> + Unsigned,