Operator

Trait Operator 

Source
pub trait Operator<T> {
    // Required method
    fn apply(a: &T, b: &T) -> T;
}
Expand description

Trait for checked arithmetic operators.

Required Methods§

Source

fn apply(a: &T, b: &T) -> T

Apply the operator to the two operands.

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§