Trait ClosedMulRef

Source
pub trait ClosedMulRef<Rhs = Self>: for<'a> Mul<&'a Rhs, Output = Self> { }
Expand description

Trait for closed multiplication operation with the right-hand side as a reference.

§Mathematical Definition

A multiplication operation · on a set S is closed if: ∀ a, b ∈ S, a · b ∈ S

This trait provides the same closure property but allows references for efficiency.

Implementors§

Source§

impl<T: for<'a> Mul<&'a T, Output = T>> ClosedMulRef for T