Derive Macro num_derive::NumOps

source ·
#[derive(NumOps)]
Expand description

Derives num_traits::NumOps for newtypes. The inner type must already implement NumOps.

Note that, since NumOps is really a trait alias for Add + Sub + Mul + Div + Rem, this macro generates impls for those traits. Furthermore, in all generated impls, RHS=Self and Output=Self.