PrivateSub

Trait PrivateSub 

Source
pub trait PrivateSub<Rhs = Self> {
    type Output;

    // Required method
    fn private_sub(self, rhs: Rhs) -> Self::Output;
}
Expand description

Does the real subtraction for UInts; Sub just calls this and then Trim.

Required Associated Types§

Required Methods§

Source

fn private_sub(self, rhs: Rhs) -> Self::Output

Implementors§

Source§

impl<U: Unsigned> PrivateSub<UTerm> for U

U - UTerm = U

Source§

impl<Ul, Ur: Unsigned> PrivateSub<UInt<Ur, B0>> for UInt<Ul, B0>
where Ul: PrivateSub<Ur> + Unsigned,

UInt<Ul, B0> - UInt<Ur, B0> = UInt<Ul - Ur, B0>

Source§

type Output = UInt<<Ul as PrivateSub<Ur>>::Output, B0>

Source§

impl<Ul, Ur: Unsigned> PrivateSub<UInt<Ur, B0>> for UInt<Ul, B1>
where Ul: PrivateSub<Ur> + Unsigned,

UInt<Ul, B1> - UInt<Ur, B0> = UInt<Ul - Ur, B1>

Source§

type Output = UInt<<Ul as PrivateSub<Ur>>::Output, B1>

Source§

impl<Ul, Ur: Unsigned> PrivateSub<UInt<Ur, B1>> for UInt<Ul, B0>
where Ul: PrivateSub<Ur> + Unsigned, PrivateSubOut<Ul, Ur>: Sub<B1>,

UInt<Ul, B0> - UInt<Ur, B1> = UInt<(Ul - Ur) - B1, B1>

Source§

type Output = UInt<<<Ul as PrivateSub<Ur>>::Output as Sub<B1>>::Output, B1>

Source§

impl<Ul, Ur: Unsigned> PrivateSub<UInt<Ur, B1>> for UInt<Ul, B1>
where Ul: PrivateSub<Ur> + Unsigned,

UInt<Ul, B1> - UInt<Ur, B1> = UInt<Ul - Ur, B0>

Source§

type Output = UInt<<Ul as PrivateSub<Ur>>::Output, B0>