PrivateCmp

Trait PrivateCmp 

Source
pub trait PrivateCmp<Rhs, SoFar> {
    type Output;

    // Required method
    fn private_cmp(&self, _: &Rhs, _: SoFar) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn private_cmp(&self, _: &Rhs, _: SoFar) -> Self::Output

Implementors§

Source§

impl<SoFar: Ord> PrivateCmp<UTerm, SoFar> for UTerm

Got to the end of both! Return SoFar

Source§

type Output = SoFar

Source§

impl<U: Unsigned, B: Bit, SoFar: Ord> PrivateCmp<UInt<U, B>, SoFar> for UTerm

Got to the end of just the Lhs. It’s Less.

Source§

impl<U: Unsigned, B: Bit, SoFar: Ord> PrivateCmp<UTerm, SoFar> for UInt<U, B>

Got to the end of just the Rhs. Lhs is Greater.

Source§

impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B0>, SoFar> for UInt<Ul, B0>
where Ul: Unsigned + PrivateCmp<Ur, SoFar>, Ur: Unsigned, SoFar: Ord,

Comparing non-terimal bits, with both having bit B0. These are Equal, so we propagate SoFar.

Source§

type Output = <Ul as PrivateCmp<Ur, SoFar>>::Output

Source§

impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B0>, SoFar> for UInt<Ul, B1>
where Ul: Unsigned + PrivateCmp<Ur, Greater>, Ur: Unsigned, SoFar: Ord,

Comparing non-terimal bits, with Lhs having bit B1 and Rhs having bit B0. SoFar, Lhs is Greater.

Source§

impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B1>, SoFar> for UInt<Ul, B0>
where Ul: Unsigned + PrivateCmp<Ur, Less>, Ur: Unsigned, SoFar: Ord,

Comparing non-terimal bits, with Lhs having bit B0 and Rhs having bit B1. SoFar, Lhs is Less.

Source§

type Output = <Ul as PrivateCmp<Ur, Less>>::Output

Source§

impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B1>, SoFar> for UInt<Ul, B1>
where Ul: Unsigned + PrivateCmp<Ur, SoFar>, Ur: Unsigned, SoFar: Ord,

Comparing non-terimal bits, with both having bit B1. These are Equal, so we propagate SoFar.

Source§

type Output = <Ul as PrivateCmp<Ur, SoFar>>::Output