Trait ArithmeticallyOperable

Source
pub trait ArithmeticallyOperable<T>:
    CheckedAdd
    + CheckedSub
    + CheckedMul
    + Sized
    + Clone
    + PartialEq
    + FromStr
    + Zero
    + Identity { }
Expand description

§Arithmetically Operable

Supertrait that englobes all the traits any operable element should implement. It includes

  • The four basic operations: addition, substraction, multiplication and division, but checked.
  • The Sized trait, which is automatically implemented for any type that has a constant size known at compile-time.
  • The Clone trait, which is automatically implemented for any type that implements Copy.
  • The PartialEq trait, which is automatically implemented for any type that implements Eq.
  • The FromStr trait, which is automatically implemented for any type that implements FromStr.
  • The Zero trait, which will indicate how the zero element of the type is represented.
  • The Identity trait, which will indicate how the identity element of the type is represented.

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§