pub trait Ops: Copy {
// Required methods
fn unary(op: UnaryOp, x: Self) -> Self;
fn binary(op: BinaryOp, x: Self, y: Self) -> Self;
fn is_finite(x: Self) -> bool;
fn lowest() -> Self;
fn highest() -> Self;
// Provided method
fn ternary(op: TernaryOp, x: Self, y: Self, z: Self) -> Self { ... }
}Expand description
Elementwise operations on one element type. Calling an operation that
the type does not support (see UnaryOp::supports) panics; callers
check the types first.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".