pub trait PrimitiveNumberRef<T>:
Sealed
+ Borrow<T>
+ PartialEq
+ PartialOrd
+ Debug
+ Display
+ LowerExp
+ UpperExp
+ Copy
+ Send
+ Sync
+ Unpin
+ Add<T, Output = T>
+ Deref<Target = T>
+ Div<T, Output = T>
+ Mul<T, Output = T>
+ Rem<T, Output = T>
+ Sub<T, Output = T>
+ RefUnwindSafe
+ UnwindSafe
+ for<'a> Add<&'a T, Output = T>
+ for<'a> Div<&'a T, Output = T>
+ for<'a> Mul<&'a T, Output = T>
+ for<'a> Rem<&'a T, Output = T>
+ for<'a> Sub<&'a T, Output = T> { }Expand description
Trait for references to primitive numbers (PrimitiveNumber).
This enables traits like the standard operators in generic code,
e.g. where &T: PrimitiveNumberRef<T>.
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.