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
Sizedtrait, which is automatically implemented for any type that has a constant size known at compile-time. - The
Clonetrait, which is automatically implemented for any type that implementsCopy. - The
PartialEqtrait, which is automatically implemented for any type that implementsEq. - The
FromStrtrait, which is automatically implemented for any type that implementsFromStr. - The
Zerotrait, which will indicate how the zero element of the type is represented. - The
Identitytrait, 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.