Skip to main content

Module const_numtraits

Module const_numtraits 

Source
Expand description

Constant versions of num_traits

§Const-friendly num_traits

This module is essentially a fork of num_traits with nightly const traits support.

§Features

  • nightly: Enables const traits support on nightly Rust.

§Examples

Traits§

ConstAbsDiff
Const-compatible absolute difference.
ConstBorrowingSub
Const-compatible subtraction with borrow for extended precision arithmetic.
ConstBounded
Const-compatible bounded value operations.
ConstCarryingAdd
Const-compatible addition with carry for extended precision arithmetic.
ConstCarryingMul
Const-compatible carrying multiplication for extended precision arithmetic.
ConstCheckedAdd
Const-compatible checked addition.
ConstCheckedDiv
Const-compatible checked division.
ConstCheckedEuclid
Const-compatible checked Euclidean division and remainder.
ConstCheckedMul
Const-compatible checked multiplication.
ConstCheckedPow
Const-compatible checked exponentiation.
ConstCheckedRem
Const-compatible checked remainder.
ConstCheckedShl
Const-compatible checked left shift.
ConstCheckedShr
Const-compatible checked right shift.
ConstCheckedSub
Const-compatible checked subtraction.
ConstDivCeil
Const-compatible ceiling division.
ConstEuclid
Const-compatible Euclidean division and remainder.
ConstFromBytes
Const-compatible byte deserialization.
ConstIlog
Const-compatible integer logarithm operations.
ConstIsqrt
Const-compatible integer square root for unsigned integers.
ConstMidpoint
Const-compatible midpoint calculation.
ConstMultiple
Const-compatible multiple-of operations.
ConstOne
Const-compatible one value operations.
ConstOverflowingAdd
Const-compatible overflowing addition.
ConstOverflowingMul
Const-compatible overflowing multiplication.
ConstOverflowingShl
Const-compatible overflowing left shift.
ConstOverflowingShr
Const-compatible overflowing right shift.
ConstOverflowingSub
Const-compatible overflowing subtraction.
ConstPowerOfTwo
Const-compatible power-of-two operations.
ConstPrimInt
Base arithmetic traits for constant primitive integers.
ConstSaturatingAdd
Const-compatible saturating addition.
ConstSaturatingMul
Const-compatible saturating multiplication.
ConstSaturatingSub
Const-compatible saturating subtraction.
ConstToBytes
Const-compatible byte serialization.
ConstUnboundedShift
Const-compatible unbounded shift operations.
ConstWideningMul
Const-compatible widening multiplication for extended precision arithmetic.
ConstWrappingAdd
Const-compatible wrapping addition.
ConstWrappingMul
Const-compatible wrapping multiplication.
ConstWrappingShl
Const-compatible wrapping left shift.
ConstWrappingShr
Const-compatible wrapping right shift.
ConstWrappingSub
Const-compatible wrapping subtraction.
ConstZero
Const-compatible zero value operations.