raith-common 0.1.0

learning project
Documentation
use std::ops::*;

trait Ops<Rhs=Self, Output=Self>:
    Add<Rhs, Output = Output>
    + Sub<Rhs, Output = Output>
    + Mul<Rhs, Output = Output>
    + Div<Rhs, Output = Output>
    + Rem<Rhs, Output = Output> {}
    
trait OpsAssign<Rhs=Self>:
    AddAssign<Rhs>
    + SubAssign<Rhs>
    + MulAssign<Rhs>
    + DivAssign<Rhs>
    + RemAssign<Rhs> {}

trait Zero {
    fn zero() -> Self;
    fn is_zero(&self) -> bool;
    fn set_zero(&self);
}

trait One {
    fn one() -> Self;
    fn is_one(&self) -> bool;
    fn set_one(&self);
}

trait Num: PartialEq + Ops + OpsAssign + One + Zero + Copy + Clone + Sized {}