num_traits

Trait NumRef

Source
pub trait NumRef: Num + for<'r> NumOps<&'r Self> { }
Expand description

The trait for Num types which also implement numeric operations taking the second operand by reference.

This is automatically implemented for types which implement the operators.

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> NumRef for T
where T: Num + for<'r> NumOps<&'r T>,