pub trait Number:
Sized
+ AddAssign
+ SubAssign
+ PartialOrd
+ PartialEq
+ Copy
+ Send
+ Sync {
// Required methods
fn from_i64(v: i64) -> Self;
fn into_f64(self) -> f64;
}
Expand description
An interface for numbers. Used to generically model float metrics and integer metrics, i.e.
Counter
and IntCounter
.
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.