pub trait Arithmetic: Expression{
// Provided methods
fn add<R>(self, rhs: R) -> ArithExpr<Self, R, Add>
where R: Expression,
R::Output: Numeric { ... }
fn sub<R>(self, rhs: R) -> ArithExpr<Self, R, Sub>
where R: Expression,
R::Output: Numeric { ... }
fn mul<R>(self, rhs: R) -> ArithExpr<Self, R, Mul>
where R: Expression,
R::Output: Numeric { ... }
fn div<R>(self, rhs: R) -> ArithExpr<Self, R, Div>
where R: Expression,
R::Output: Numeric { ... }
fn modulo<R>(self, rhs: R) -> ArithExpr<Self, R, Mod>
where R: Expression,
R::Output: Numeric { ... }
}Expand description
Trait for arithmetic operations
Provided Methods§
fn add<R>(self, rhs: R) -> ArithExpr<Self, R, Add>
fn sub<R>(self, rhs: R) -> ArithExpr<Self, R, Sub>
fn mul<R>(self, rhs: R) -> ArithExpr<Self, R, Mul>
fn div<R>(self, rhs: R) -> ArithExpr<Self, R, Div>
fn modulo<R>(self, rhs: R) -> ArithExpr<Self, R, Mod>
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.