NumOps in num_traits - Rust
Description: Generic trait for types implementing basic numeric operations
Keywords: rust, rustlang, rust-lang, NumOps

# Trait num_traits::NumOps

source ·

    pub trait NumOps<Rhs = Self, Output = Self>: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Rem<Rhs, Output = Output> { }

Expand description

Generic trait for types implementing basic numeric operations

This is automatically implemented for types which implement the operators.

## Implementors§

source§

### impl<T, Rhs, Output> NumOps<Rhs, Output> for Twhere
T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Rem<Rhs, Output = Output>,