NumExt

Trait NumExt 

Source
pub trait NumExt:
    Num
    + NumCast
    + NumAssign
    + CmpExt
    + Copy
    + Debug
    + Sum
    + Default { }
Expand description

A comprehensive numeric trait that combines all necessary numeric operations for array elements.

This trait serves as a convenient bound that includes all the numeric traits needed for array operations, including basic arithmetic, casting, assignment operations, comparison, copying, debugging, summation, and default values.

§Automatically Implemented

This trait is automatically implemented for any type that satisfies all the constituent traits:

  • Num: Basic arithmetic operations
  • NumCast: Numeric type casting
  • NumAssign: Assignment arithmetic operations
  • CmpExt: Extended comparison operations
  • Copy: Efficient copying
  • Debug: Debug formatting
  • Sum: Summation operations
  • Default: Default value construction

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> NumExt for T
where T: Num + NumCast + NumAssign + CmpExt + Copy + Debug + Sum + Default,