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 implementsCopy
. - The
PartialEq
trait, which is automatically implemented for any type that implementsEq
. - The
FromStr
trait, which is automatically implemented for any type that implementsFromStr
. - 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.