pub trait UnitType:
Debug
+ Copy
+ PartialEq
+ PartialOrd
+ Serialize
+ Add
+ Sub
+ Div
+ 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;
}
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", so this trait is not object safe.