pub trait Num:
Default
+ PartialEq
+ PartialOrd
+ Copy
+ AddAssign
+ MulAssign
+ SubAssign
+ DivAssign
+ Add<Output = Self>
+ Mul<Output = Self>
+ Sub<Output = Self>
+ Div<Output = Self>
+ Neg<Output = Self> {
// Required methods
fn zero() -> Self;
fn two() -> Self;
fn four() -> Self;
fn max() -> Self;
fn from_usize(value: usize) -> Self;
fn get_max(a: Self, b: Self) -> Self;
fn get_min(a: Self, b: Self) -> Self;
}
Expand description
A signed Number type. Currently implemented for f32, f64, i8, i16, i32 and i64.
Required Methods§
fn zero() -> Self
fn two() -> Self
fn four() -> Self
fn max() -> Self
fn from_usize(value: usize) -> Self
fn get_max(a: Self, b: Self) -> Self
fn get_min(a: Self, b: Self) -> Self
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.