Module typenum::type_operators 
source · Expand description
Useful type operators that are not defined in core::ops.
Traits§
- A type operator that returns the absolute value.
- A type operator for comparingSelfandRhs. It provides a similar functionality to the functioncore::cmp::Ord::cmpbut for types.
- A type operator that returnsTrueifSelf == Rhs, otherwise returnsFalse.
- A type operator that returnsTrueifSelf > Rhs, otherwise returnsFalse.
- A type operator that returnsTrueifSelf >= Rhs, otherwise returnsFalse.
- A type operator that returnsTrueifSelf < Rhs, otherwise returnsFalse.
- A type operator that returnsTrueifSelf <= Rhs, otherwise returnsFalse.
- A type operator that returnsTrueifSelf != Rhs, otherwise returnsFalse.
- A type operator that gives the length of anArrayor the number of bits in aUInt.
- A type operator for taking the integer binary logarithm ofSelf.
- A type operator that returns the maximum ofSelfandRhs.
- A type operator that returns the minimum ofSelfandRhs.
- Division as a partial function. This type operator performs division just asDiv, but is only defined when the result is an integer (i.e. there is no remainder).
- A type operator that provides exponentiation by repeated squaring.
- A type operator that ensures thatRhsis the same asSelf, it is mainly useful for writing macros that can take arbitrary binary or unary operators.
- A type operator for taking the integer square root ofSelf.
- A type operator for taking a concrete integer value from a type.