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§
- Const
AbsDiff - Const-compatible absolute difference.
- Const
Borrowing Sub - Const-compatible subtraction with borrow for extended precision arithmetic.
- Const
Bounded - Const-compatible bounded value operations.
- Const
Carrying Add - Const-compatible addition with carry for extended precision arithmetic.
- Const
Carrying Mul - Const-compatible carrying multiplication for extended precision arithmetic.
- Const
Checked Add - Const-compatible checked addition.
- Const
Checked Div - Const-compatible checked division.
- Const
Checked Euclid - Const-compatible checked Euclidean division and remainder.
- Const
Checked Mul - Const-compatible checked multiplication.
- Const
Checked Pow - Const-compatible checked exponentiation.
- Const
Checked Rem - Const-compatible checked remainder.
- Const
Checked Shl - Const-compatible checked left shift.
- Const
Checked Shr - Const-compatible checked right shift.
- Const
Checked Sub - Const-compatible checked subtraction.
- Const
DivCeil - Const-compatible ceiling division.
- Const
Euclid - Const-compatible Euclidean division and remainder.
- Const
From Bytes - Const-compatible byte deserialization.
- Const
Ilog - Const-compatible integer logarithm operations.
- Const
Isqrt - Const-compatible integer square root for unsigned integers.
- Const
Midpoint - Const-compatible midpoint calculation.
- Const
Multiple - Const-compatible multiple-of operations.
- Const
One - Const-compatible one value operations.
- Const
Overflowing Add - Const-compatible overflowing addition.
- Const
Overflowing Mul - Const-compatible overflowing multiplication.
- Const
Overflowing Shl - Const-compatible overflowing left shift.
- Const
Overflowing Shr - Const-compatible overflowing right shift.
- Const
Overflowing Sub - Const-compatible overflowing subtraction.
- Const
Power OfTwo - Const-compatible power-of-two operations.
- Const
Prim Int - Base arithmetic traits for constant primitive integers.
- Const
Saturating Add - Const-compatible saturating addition.
- Const
Saturating Mul - Const-compatible saturating multiplication.
- Const
Saturating Sub - Const-compatible saturating subtraction.
- Const
ToBytes - Const-compatible byte serialization.
- Const
Unbounded Shift - Const-compatible unbounded shift operations.
- Const
Widening Mul - Const-compatible widening multiplication for extended precision arithmetic.
- Const
Wrapping Add - Const-compatible wrapping addition.
- Const
Wrapping Mul - Const-compatible wrapping multiplication.
- Const
Wrapping Shl - Const-compatible wrapping left shift.
- Const
Wrapping Shr - Const-compatible wrapping right shift.
- Const
Wrapping Sub - Const-compatible wrapping subtraction.
- Const
Zero - Const-compatible zero value operations.