pub trait UnitStruct<T>: Unit<T> {
type Output;
// Required methods
fn new(value: f64, units: T) -> <Self as UnitStruct<T>>::Output;
fn value(&self) -> f64;
fn units(&self) -> T;
}
Expand description
Represents a Value/Unit pairing
Required Associated Types§
Required Methods§
Sourcefn new(value: f64, units: T) -> <Self as UnitStruct<T>>::Output
fn new(value: f64, units: T) -> <Self as UnitStruct<T>>::Output
Creates a new type
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.