Trait diffgeom::typenum::Cmp  
                   
                       [−]
                   
               
pub trait Cmp<Rhs = Self> {
    type Output;
}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 typenum::{Cmp, Ord, N3, P2, P5}; use std::cmp::Ordering; assert_eq!(<P2 as Cmp<N3>>::Output::to_ordering(), Ordering::Greater); assert_eq!(<P2 as Cmp<P2>>::Output::to_ordering(), Ordering::Equal); assert_eq!(<P2 as Cmp<P5>>::Output::to_ordering(), Ordering::Less);
Associated Types
type Output
The result of the comparison. It should only ever be one of Greater, Less, or Equal.
Implementors
- impl<U, B> Cmp<UTerm> for UInt<U, B> where
 B: Bit,
 U: Unsigned,
- impl<U> Cmp<PInt<U>> for Z0 where
 U: NonZero + Unsigned,
- impl Cmp<B1> for B1
- impl<Nl, Nr> Cmp<NInt<Nr>> for NInt<Nl> where
 Nl: NonZero + Unsigned,
 Nr: NonZero + Unsigned + Cmp<Nl>,
- impl<U> Cmp<Z0> for PInt<U> where
 U: NonZero + Unsigned,
- impl Cmp<B1> for B0
- impl Cmp<B0> for B0
- impl Cmp<UTerm> for UTerm
- impl<Ul, Ur> Cmp<UInt<Ur, B1>> for UInt<Ul, B1> where
 Ul: Unsigned + PrivateCmp<Ur, Equal>,
 Ur: Unsigned,
- impl<P, N> Cmp<NInt<N>> for PInt<P> where
 N: NonZero + Unsigned,
 P: NonZero + Unsigned,
- impl<U> Cmp<NInt<U>> for Z0 where
 U: NonZero + Unsigned,
- impl<P, N> Cmp<PInt<P>> for NInt<N> where
 N: NonZero + Unsigned,
 P: NonZero + Unsigned,
- impl<U> Cmp<Z0> for NInt<U> where
 U: NonZero + Unsigned,
- impl<Ul, Ur> Cmp<UInt<Ur, B1>> for UInt<Ul, B0> where
 Ul: Unsigned + PrivateCmp<Ur, Less>,
 Ur: Unsigned,
- impl<Ul, Ur> Cmp<UInt<Ur, B0>> for UInt<Ul, B1> where
 Ul: Unsigned + PrivateCmp<Ur, Greater>,
 Ur: Unsigned,
- impl<Ul, Ur> Cmp<UInt<Ur, B0>> for UInt<Ul, B0> where
 Ul: Unsigned + PrivateCmp<Ur, Equal>,
 Ur: Unsigned,
- impl<U, B> Cmp<UInt<U, B>> for UTerm where
 B: Bit,
 U: Unsigned,
- impl Cmp<Z0> for Z0
- impl Cmp<B0> for B1
- impl<Pl, Pr> Cmp<PInt<Pr>> for PInt<Pl> where
 Pl: NonZero + Unsigned + Cmp<Pr>,
 Pr: NonZero + Unsigned,