pub trait SwappedOperations<Lhs = Self> {
    type Output;
    fn sub_swapped(self, lhs: Lhs) -> Self::Output;
fn div_swapped(self, lhs: Lhs) -> Self::Output; }
Expand description

A trait which defines subtraction and division with the arguments swapped around, ie 5.sub_swapped(7) would equal 2. This trait is only implemented for Records and constant operations.

Addition and Multiplication are not included because argument order doesn’t matter for those operations, so you can just swap the left and right and get the same result.

Implementations for Trace are not included because you can just lift a constant to a Trace with ease. While you can lift constants to Records with ease too, these operations allow for the avoidance of storing the constant on the WengertList which saves memory.

Associated Types

Required methods

Implementors