pub trait Quantity:
Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Percentage, Output = Self>
+ Mul<f32, Output = Self>
+ Div<f32, Output = Self>
+ Div<Self, Output = f32>
+ PartialOrd
+ Display
+ Copy
+ Clone
+ Debug
+ Default
+ Sized
+ Send
+ Sync {
// Provided method
fn zero() -> Self { ... }
}Expand description
A trait for physical quantities that supports basic arithmetic operations.
Provided Methods§
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.