Expand description
Useful type operators that are not defined in core::ops.
Traitsยง
- Abs
- A type operator that returns the absolute value.
- Cmp
- A type operator for comparing
SelfandRhs. It provides a similar functionality to the functioncore::cmp::Ord::cmpbut for types. - Gcd
- A type operator that computes the greatest common divisor of
SelfandRhs. - IsEqual
- A type operator that returns
TrueifSelf == Rhs, otherwise returnsFalse. - IsGreater
- A type operator that returns
TrueifSelf > Rhs, otherwise returnsFalse. - IsGreater
OrEqual - A type operator that returns
TrueifSelf >= Rhs, otherwise returnsFalse. - IsLess
- A type operator that returns
TrueifSelf < Rhs, otherwise returnsFalse. - IsLess
OrEqual - A type operator that returns
TrueifSelf <= Rhs, otherwise returnsFalse. - IsNot
Equal - A type operator that returns
TrueifSelf != Rhs, otherwise returnsFalse. - Len
- A type operator that gives the length of an
Arrayor the number of bits in aUInt. - Logarithm2
- A type operator for taking the integer binary logarithm of
Self. - Max
- A type operator that returns the maximum of
SelfandRhs. - Min
- A type operator that returns the minimum of
SelfandRhs. - Partial
Div - Division as a partial function. This type operator performs division just as
Div, but is only defined when the result is an integer (i.e. there is no remainder). - Pow
- A type operator that provides exponentiation by repeated squaring.
- Same
- A type operator that ensures that
Rhsis the same asSelf, it is mainly useful for writing macros that can take arbitrary binary or unary operators. - Square
Root - A type operator for taking the integer square root of
Self. - ToInt
- A type operator for taking a concrete integer value from a type.