Crate num_traits

source ·
Expand description

Numeric traits for generic mathematics

§Compatibility

The num-traits crate is tested for rustc 1.8 and greater.

Re-exports§

Modules§

Structs§

Enums§

Traits§

  • The base trait for numeric types, covering 0 and 1 values, comparisons, basic numeric operations, and string conversion.
  • The trait for Num types which also implement assignment operators.
  • Generic trait for types implementing numeric assignment operators (like +=).
  • The trait for NumAssign types which also implement assignment operations taking the second operand by reference.
  • Generic trait for types implementing basic numeric operations
  • The trait for Num types which also implement numeric operations taking the second operand by reference.
  • The trait for Num references which implement numeric operations, taking the second operand either by value or by reference.

Functions§

  • A value bounded by a minimum and a maximum
  • A value bounded by a maximum value
  • A value bounded by a minimum value