pub trait BinaryOperable {
// Required method
fn bin_op(self, op: BinOpKind, rhs: impl Into<Expr>) -> Binary;
// Provided methods
fn add(self, rhs: impl Into<Expr>) -> Binary
where Self: Sized { ... }
fn sub(self, rhs: impl Into<Expr>) -> Binary
where Self: Sized { ... }
fn mul(self, rhs: impl Into<Expr>) -> Binary
where Self: Sized { ... }
fn div(self, rhs: impl Into<Expr>) -> Binary
where Self: Sized { ... }
}
Required Methods§
Provided Methods§
fn add(self, rhs: impl Into<Expr>) -> Binarywhere
Self: Sized,
fn sub(self, rhs: impl Into<Expr>) -> Binarywhere
Self: Sized,
fn mul(self, rhs: impl Into<Expr>) -> Binarywhere
Self: Sized,
fn div(self, rhs: impl Into<Expr>) -> Binarywhere
Self: Sized,
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.