Numerical

Trait Numerical 

Source
pub trait Numerical:
    OrderedNum<Output = Self, Output = Self>
    + Clone
    + Copy
    + Default
    + FromPrimitive
    + ToPrimitive
    + PyMod<Output = Self>
    + Debug
    + Display
    + Add
    + Sub<Output = Self>
    + Mul
    + Div<Output = Self>
    + Rem<Output = Self>
    + AddAssign
    + DivAssign
    + MulAssign
    + RemAssign
    + SubAssign {
    // Provided methods
    fn apply<F, U>(self, f: F) -> U
       where F: FnOnce(Self) -> U { ... }
    fn abs(self) -> Self
       where Self: Neg<Output = Self> { ... }
}

Provided Methods§

Source

fn apply<F, U>(self, f: F) -> U
where F: FnOnce(Self) -> U,

Source

fn abs(self) -> Self
where Self: Neg<Output = 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.

Implementors§

Source§

impl<T> Numerical for T
where T: ToPrimitive + One<Output = T> + Zero<Output = T> + PitchMod<Output = T> + PyMod<Output = T> + Clone + Debug + Display + Add + Copy + Sub<Output = T> + Default + Mul + PartialEq + Div<Output = T> + PartialOrd + Rem<Output = T> + FromPrimitive + AddAssign + DivAssign + MulAssign + RemAssign + SubAssign,