Trait BinOp

Source
pub trait BinOp<A, B = A> {
    type Output;

    // Required method
    fn eval(&self, lhs: A, rhs: B) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn eval(&self, lhs: A, rhs: B) -> Self::Output

Trait Implementations§

Source§

impl<A, B, C> BinOp<A, B> for Box<dyn BinOp<A, B, Output = C>>

Source§

type Output = C

Source§

fn eval(&self, lhs: A, rhs: B) -> Self::Output

Implementations on Foreign Types§

Source§

impl<A, B, C> BinOp<A, B> for Box<dyn BinOp<A, B, Output = C>>

Source§

type Output = C

Source§

fn eval(&self, lhs: A, rhs: B) -> Self::Output

Implementors§

Source§

impl<A, B> BinOp<A, B> for Arithmetic
where A: NumOps<B> + Pow<B, Output = A>,

Source§

impl<A, B> BinOp<A, B> for ArithmeticAssign
where A: NumAssignOps<B>,

Source§

impl<A, B> BinOp<A, B> for AddAssign
where A: AddAssign<B>,

Source§

impl<A, B> BinOp<A, B> for DivAssign
where A: DivAssign<B>,

Source§

impl<A, B> BinOp<A, B> for MulAssign
where A: MulAssign<B>,

Source§

impl<A, B> BinOp<A, B> for RemAssign
where A: RemAssign<B>,

Source§

impl<A, B> BinOp<A, B> for SubAssign
where A: SubAssign<B>,

Source§

impl<A, B, C> BinOp<A, B> for Addition
where A: Add<B, Output = C>,

Source§

impl<A, B, C> BinOp<A, B> for Division
where A: Div<B, Output = C>,

Source§

impl<A, B, C> BinOp<A, B> for Multiplication
where A: Mul<B, Output = C>,

Source§

impl<A, B, C> BinOp<A, B> for Power
where A: Pow<B, Output = C>,

Source§

impl<A, B, C> BinOp<A, B> for Remainder
where A: Rem<B, Output = C>,

Source§

impl<A, B, C> BinOp<A, B> for Subtraction
where A: Sub<B, Output = C>,

Source§

impl<S, A, B, C> BinOp<A, B> for S
where S: Fn(A, B) -> C,