pub trait UnitType:
Debug
+ Copy
+ FromStr
+ PartialEq
+ PartialOrd
+ Serialize
+ Add
+ Sub
+ Div
+ Neg
+ Mul<Dimensionless, Output = Self>
+ AddAssign
+ SubAssign
+ Sum
+ ApproxEq<Margin = F64Margin>
+ Display {
// Required methods
fn new(value: f64) -> Self;
fn value(&self) -> f64;
fn is_normal(&self) -> bool;
fn is_finite(&self) -> bool;
fn abs(&self) -> Self;
fn max(&self, other: Self) -> Self;
fn min(&self, other: Self) -> Self;
fn total_cmp(&self, other: &Self) -> Ordering;
}Expand description
A trait encompassing most of the functionality of unit types
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".