pub trait Binary<Lhs, Rhs> {
type Output;
// Required method
fn op(lhs: Lhs, rhs: Rhs) -> Self::Output;
// Provided method
fn op_assign(lhs: &mut Lhs, rhs: Rhs)
where Lhs: Assignable<Self::Output> { ... }
}
Expand description
Trait that represents a binary operation on the left-hand operand of type
Lhs
and the right-hand operand of type Rhs
that returns the result of
type Output
.
See Async::op
and
Async::op_assign
.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn op_assign(lhs: &mut Lhs, rhs: Rhs)where
Lhs: Assignable<Self::Output>,
fn op_assign(lhs: &mut Lhs, rhs: Rhs)where
Lhs: Assignable<Self::Output>,
Do the binary operation on given operands and assign the result to the
lhs
operand.
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.