pub struct UInt<U, B> { /* private fields */ }Expand description
UInt is defined recursively, where B is the least significant bit and U is the rest
of the number. Conceptually, U should be bound by the trait Unsigned and B should
be bound by the trait Bit, but enforcing these bounds causes linear instead of
logrithmic scaling in some places, so they are left off for now. They may be enforced in
future.
In order to keep numbers unique, leading zeros are not allowed, so UInt<UTerm, B0> is
forbidden.
§Example
use typenum::{UInt, UTerm, B0, B1};
type U6 = UInt<UInt<UInt<UTerm, B1>, B1>, B0>;Implementations§
Trait Implementations§
Source§impl<Ul, Ur: Unsigned> Add<UInt<Ur, B0>> for UInt<Ul, B0>
UInt<Ul, B0> + UInt<Ur, B0> = UInt<Ul + Ur, B0>
impl<Ul, Ur: Unsigned> Add<UInt<Ur, B0>> for UInt<Ul, B0>
UInt<Ul, B0> + UInt<Ur, B0> = UInt<Ul + Ur, B0>
Source§impl<Ul, Ur: Unsigned> Add<UInt<Ur, B0>> for UInt<Ul, B1>
UInt<Ul, B1> + UInt<Ur, B0> = UInt<Ul + Ur, B1>
impl<Ul, Ur: Unsigned> Add<UInt<Ur, B0>> for UInt<Ul, B1>
UInt<Ul, B1> + UInt<Ur, B0> = UInt<Ul + Ur, B1>
Source§impl<Ul, Ur: Unsigned> Add<UInt<Ur, B1>> for UInt<Ul, B0>
UInt<Ul, B0> + UInt<Ur, B1> = UInt<Ul + Ur, B1>
impl<Ul, Ur: Unsigned> Add<UInt<Ur, B1>> for UInt<Ul, B0>
UInt<Ul, B0> + UInt<Ur, B1> = UInt<Ul + Ur, B1>
Source§impl<Ul, Ur: Unsigned> Add<UInt<Ur, B1>> for UInt<Ul, B1>
UInt<Ul, B1> + UInt<Ur, B1> = UInt<(Ul + Ur) + B1, B0>
impl<Ul, Ur: Unsigned> Add<UInt<Ur, B1>> for UInt<Ul, B1>
UInt<Ul, B1> + UInt<Ur, B1> = UInt<(Ul + Ur) + B1, B0>
Source§impl<Ul: Unsigned, Bl: Bit, Ur: Unsigned> BitAnd<Ur> for UInt<Ul, Bl>
Anding unsigned integers.
We use our PrivateAnd operator and then Trim the output.
impl<Ul: Unsigned, Bl: Bit, Ur: Unsigned> BitAnd<Ur> for UInt<Ul, Bl>
Anding unsigned integers.
We use our PrivateAnd operator and then Trim the output.
Source§impl<Ul, Ur: Unsigned> BitOr<UInt<Ur, B0>> for UInt<Ul, B0>
UInt<Ul, B0> | UInt<Ur, B0> = UInt<Ul | Ur, B0>
impl<Ul, Ur: Unsigned> BitOr<UInt<Ur, B0>> for UInt<Ul, B0>
UInt<Ul, B0> | UInt<Ur, B0> = UInt<Ul | Ur, B0>
Source§impl<Ul, Ur: Unsigned> BitOr<UInt<Ur, B0>> for UInt<Ul, B1>
UInt<Ul, B1> | UInt<Ur, B0> = UInt<Ul | Ur, B1>
impl<Ul, Ur: Unsigned> BitOr<UInt<Ur, B0>> for UInt<Ul, B1>
UInt<Ul, B1> | UInt<Ur, B0> = UInt<Ul | Ur, B1>
Source§impl<Ul, Ur: Unsigned> BitOr<UInt<Ur, B1>> for UInt<Ul, B0>
UInt<Ul, B0> | UInt<Ur, B1> = UInt<Ul | Ur, B1>
impl<Ul, Ur: Unsigned> BitOr<UInt<Ur, B1>> for UInt<Ul, B0>
UInt<Ul, B0> | UInt<Ur, B1> = UInt<Ul | Ur, B1>
Source§impl<Ul, Ur: Unsigned> BitOr<UInt<Ur, B1>> for UInt<Ul, B1>
UInt<Ul, B1> | UInt<Ur, B1> = UInt<Ul | Ur, B1>
impl<Ul, Ur: Unsigned> BitOr<UInt<Ur, B1>> for UInt<Ul, B1>
UInt<Ul, B1> | UInt<Ur, B1> = UInt<Ul | Ur, B1>
Source§impl<Ul: Unsigned, Bl: Bit, Ur: Unsigned> BitXor<Ur> for UInt<Ul, Bl>
Xoring unsigned integers.
We use our PrivateXor operator and then Trim the output.
impl<Ul: Unsigned, Bl: Bit, Ur: Unsigned> BitXor<Ur> for UInt<Ul, Bl>
Xoring unsigned integers.
We use our PrivateXor operator and then Trim the output.
Source§impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B0>> for UInt<Ul, B0>
UInt<Ul, B0> cmp with UInt<Ur, B0>: SoFar is Equal
impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B0>> for UInt<Ul, B0>
UInt<Ul, B0> cmp with UInt<Ur, B0>: SoFar is Equal
Source§impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B0>> for UInt<Ul, B1>
UInt<Ul, B1> cmp with UInt<Ur, B0>: SoFar is Greater
impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B0>> for UInt<Ul, B1>
UInt<Ul, B1> cmp with UInt<Ur, B0>: SoFar is Greater
Source§impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B1>> for UInt<Ul, B0>
UInt<Ul, B0> cmp with UInt<Ur, B1>: SoFar is Less
impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B1>> for UInt<Ul, B0>
UInt<Ul, B0> cmp with UInt<Ur, B1>: SoFar is Less
Source§impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B1>> for UInt<Ul, B1>
UInt<Ul, B1> cmp with UInt<Ur, B1>: SoFar is Equal
impl<Ul, Ur: Unsigned> Cmp<UInt<Ur, B1>> for UInt<Ul, B1>
UInt<Ul, B1> cmp with UInt<Ur, B1>: SoFar is Equal
Source§impl<U: Eq, B: Eq> Eq for UInt<U, B>
impl<U: Eq, B: Eq> Eq for UInt<U, B>
#[doc(hidden)] fn assert_receiver_is_total_eq(&self)
Source§impl<Xp, Yp> Gcd<UInt<Yp, B0>> for UInt<Xp, B0>
gcd(x, y) = 2*gcd(x/2, y/2) if both x and y even
impl<Xp, Yp> Gcd<UInt<Yp, B0>> for UInt<Xp, B0>
gcd(x, y) = 2*gcd(x/2, y/2) if both x and y even
Source§impl<Xp, Yp> Gcd<UInt<Yp, B1>> for UInt<Xp, B1>where
UInt<Xp, B1>: Max<UInt<Yp, B1>> + Min<UInt<Yp, B1>>,
UInt<Yp, B1>: Max<UInt<Xp, B1>> + Min<UInt<Xp, B1>>,
Maximum<UInt<Xp, B1>, UInt<Yp, B1>>: Sub<Minimum<UInt<Xp, B1>, UInt<Yp, B1>>>,
Diff<Maximum<UInt<Xp, B1>, UInt<Yp, B1>>, Minimum<UInt<Xp, B1>, UInt<Yp, B1>>>: Gcd<Minimum<UInt<Xp, B1>, UInt<Yp, B1>>>,
gcd(x, y) = gcd([max(x, y) - min(x, y)], min(x, y)) if both x and y odd
impl<Xp, Yp> Gcd<UInt<Yp, B1>> for UInt<Xp, B1>where
UInt<Xp, B1>: Max<UInt<Yp, B1>> + Min<UInt<Yp, B1>>,
UInt<Yp, B1>: Max<UInt<Xp, B1>> + Min<UInt<Xp, B1>>,
Maximum<UInt<Xp, B1>, UInt<Yp, B1>>: Sub<Minimum<UInt<Xp, B1>, UInt<Yp, B1>>>,
Diff<Maximum<UInt<Xp, B1>, UInt<Yp, B1>>, Minimum<UInt<Xp, B1>, UInt<Yp, B1>>>: Gcd<Minimum<UInt<Xp, B1>, UInt<Yp, B1>>>,
gcd(x, y) = gcd([max(x, y) - min(x, y)], min(x, y)) if both x and y odd
This will immediately invoke the case for x even and y odd because the difference of two odd numbers is an even number.
Source§impl<U, B: Bit> Invert for UInt<U, B>
impl<U, B: Bit> Invert for UInt<U, B>
type Output = <U as PrivateInvert<InvertedUInt<InvertedUTerm, B>>>::Output
fn invert(self) -> Self::Output
Source§impl<Ul, B: Bit, Ur: Unsigned> Mul<UInt<Ur, B>> for UInt<Ul, B0>
UInt<Ul, B0> * UInt<Ur, B> = UInt<(Ul * UInt<Ur, B>), B0>
impl<Ul, B: Bit, Ur: Unsigned> Mul<UInt<Ur, B>> for UInt<Ul, B0>
UInt<Ul, B0> * UInt<Ur, B> = UInt<(Ul * UInt<Ur, B>), B0>
Source§impl<Ul, B: Bit, Ur: Unsigned> Mul<UInt<Ur, B>> for UInt<Ul, B1>
UInt<Ul, B1> * UInt<Ur, B> = UInt<(Ul * UInt<Ur, B>), B0> + UInt<Ur, B>
impl<Ul, B: Bit, Ur: Unsigned> Mul<UInt<Ur, B>> for UInt<Ul, B1>
UInt<Ul, B1> * UInt<Ur, B> = UInt<(Ul * UInt<Ur, B>), B0> + UInt<Ur, B>
Source§impl<U: Ord, B: Ord> Ord for UInt<U, B>
impl<U: Ord, B: Ord> Ord for UInt<U, B>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<U: PartialOrd, B: PartialOrd> PartialOrd for UInt<U, B>
impl<U: PartialOrd, B: PartialOrd> PartialOrd for UInt<U, B>
Source§#[doc(hidden)] fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)] fn __chaining_lt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)self == other, returns ControlFlow::Continue(()).
Otherwise, returns ControlFlow::Break(self < other). Read moreSource§#[doc(hidden)] fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)] fn __chaining_le(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for <= instead of <.Source§#[doc(hidden)] fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)] fn __chaining_gt(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for > instead of <.Source§#[doc(hidden)] fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
#[doc(hidden)] fn __chaining_ge(&self, other: &Rhs) -> ControlFlow<bool>
partial_ord_chaining_methods)__chaining_lt, but for >= instead of <.Source§impl<Ul, Ur: Unsigned> PrivateAnd<UInt<Ur, B0>> for UInt<Ul, B0>where
Ul: PrivateAnd<Ur> + Unsigned,
UInt<Ul, B0> & UInt<Ur, B0> = UInt<Ul & Ur, B0>
impl<Ul, Ur: Unsigned> PrivateAnd<UInt<Ur, B0>> for UInt<Ul, B0>where
Ul: PrivateAnd<Ur> + Unsigned,
UInt<Ul, B0> & UInt<Ur, B0> = UInt<Ul & Ur, B0>
Source§impl<Ul, Ur: Unsigned> PrivateAnd<UInt<Ur, B0>> for UInt<Ul, B1>where
Ul: PrivateAnd<Ur> + Unsigned,
UInt<Ul, B1> & UInt<Ur, B0> = UInt<Ul & Ur, B0>
impl<Ul, Ur: Unsigned> PrivateAnd<UInt<Ur, B0>> for UInt<Ul, B1>where
Ul: PrivateAnd<Ur> + Unsigned,
UInt<Ul, B1> & UInt<Ur, B0> = UInt<Ul & Ur, B0>
Source§impl<Ul, Ur: Unsigned> PrivateAnd<UInt<Ur, B1>> for UInt<Ul, B0>where
Ul: PrivateAnd<Ur> + Unsigned,
UInt<Ul, B0> & UInt<Ur, B1> = UInt<Ul & Ur, B0>
impl<Ul, Ur: Unsigned> PrivateAnd<UInt<Ur, B1>> for UInt<Ul, B0>where
Ul: PrivateAnd<Ur> + Unsigned,
UInt<Ul, B0> & UInt<Ur, B1> = UInt<Ul & Ur, B0>
Source§impl<Ul, Ur: Unsigned> PrivateAnd<UInt<Ur, B1>> for UInt<Ul, B1>where
Ul: PrivateAnd<Ur> + Unsigned,
UInt<Ul, B1> & UInt<Ur, B1> = UInt<Ul & Ur, B1>
impl<Ul, Ur: Unsigned> PrivateAnd<UInt<Ur, B1>> for UInt<Ul, B1>where
Ul: PrivateAnd<Ur> + Unsigned,
UInt<Ul, B1> & UInt<Ur, B1> = UInt<Ul & Ur, B1>
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.
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<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B0>, SoFar> for UInt<Ul, B0>
Comparing non-terimal bits, with both having bit B0.
These are Equal, so we propagate SoFar.
impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B0>, SoFar> for UInt<Ul, B0>
Comparing non-terimal bits, with both having bit B0.
These are Equal, so we propagate SoFar.
Source§impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B0>, SoFar> for UInt<Ul, B1>
Comparing non-terimal bits, with Lhs having bit B1 and Rhs having bit B0.
SoFar, Lhs is Greater.
impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B0>, SoFar> for UInt<Ul, B1>
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>
Comparing non-terimal bits, with Lhs having bit B0 and Rhs having bit B1.
SoFar, Lhs is Less.
impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B1>, SoFar> for UInt<Ul, B0>
Comparing non-terimal bits, with Lhs having bit B0 and Rhs having bit B1.
SoFar, Lhs is Less.
Source§impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B1>, SoFar> for UInt<Ul, B1>
Comparing non-terimal bits, with both having bit B1.
These are Equal, so we propagate SoFar.
impl<Ul, Ur, SoFar> PrivateCmp<UInt<Ur, B1>, SoFar> for UInt<Ul, B1>
Comparing non-terimal bits, with both having bit B1.
These are Equal, so we propagate SoFar.
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.
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<N, D, Q, Ur, Br, I> PrivateDiv<N, D, Q, UInt<Ur, Br>, I> for ()
impl<N, D, Q, Ur, Br, I> PrivateDiv<N, D, Q, UInt<Ur, Br>, I> for ()
type Quotient = <() as PrivateDivIf<N, D, Q, UInt<UInt<Ur, Br>, <N as GetBit<I>>::Output>, I, <UInt<UInt<Ur, Br>, <N as GetBit<I>>::Output> as Cmp<D>>::Output>>::Quotient
type Remainder = <() as PrivateDivIf<N, D, Q, UInt<UInt<Ur, Br>, <N as GetBit<I>>::Output>, I, <UInt<UInt<Ur, Br>, <N as GetBit<I>>::Output> as Cmp<D>>::Output>>::Remainder
fn private_div_quotient( self, n: N, d: D, q: Q, r: UInt<Ur, Br>, i: I, ) -> Self::Quotient
fn private_div_remainder( self, n: N, d: D, q: Q, r: UInt<Ur, Br>, i: I, ) -> Self::Remainder
Source§impl<N, D, Q, R, Ui, Bi> PrivateDivIf<N, D, Q, R, UInt<Ui, Bi>, Equal> for ()
impl<N, D, Q, R, Ui, Bi> PrivateDivIf<N, D, Q, R, UInt<Ui, Bi>, Equal> for ()
type Quotient = <() as PrivateDiv<N, D, <Q as SetBit<UInt<Ui, Bi>, B1>>::Output, UTerm, <UInt<Ui, Bi> as Sub<B1>>::Output>>::Quotient
type Remainder = <() as PrivateDiv<N, D, <Q as SetBit<UInt<Ui, Bi>, B1>>::Output, UTerm, <UInt<Ui, Bi> as Sub<B1>>::Output>>::Remainder
fn private_div_if_quotient( self, n: N, d: D, q: Q, _: R, i: UInt<Ui, Bi>, _: Equal, ) -> Self::Quotient
fn private_div_if_remainder( self, n: N, d: D, q: Q, _: R, i: UInt<Ui, Bi>, _: Equal, ) -> Self::Remainder
Source§impl<N, D, Q, R, Ui, Bi> PrivateDivIf<N, D, Q, R, UInt<Ui, Bi>, Greater> for ()
impl<N, D, Q, R, Ui, Bi> PrivateDivIf<N, D, Q, R, UInt<Ui, Bi>, Greater> for ()
type Quotient = <() as PrivateDiv<N, D, <Q as SetBit<UInt<Ui, Bi>, B1>>::Output, <R as Sub<D>>::Output, <UInt<Ui, Bi> as Sub<B1>>::Output>>::Quotient
type Remainder = <() as PrivateDiv<N, D, <Q as SetBit<UInt<Ui, Bi>, B1>>::Output, <R as Sub<D>>::Output, <UInt<Ui, Bi> as Sub<B1>>::Output>>::Remainder
fn private_div_if_quotient( self, n: N, d: D, q: Q, r: R, i: UInt<Ui, Bi>, _: Greater, ) -> Self::Quotient
fn private_div_if_remainder( self, n: N, d: D, q: Q, r: R, i: UInt<Ui, Bi>, _: Greater, ) -> Self::Remainder
Source§impl<N, D, Q, R, Ui, Bi> PrivateDivIf<N, D, Q, R, UInt<Ui, Bi>, Less> for ()
impl<N, D, Q, R, Ui, Bi> PrivateDivIf<N, D, Q, R, UInt<Ui, Bi>, Less> for ()
type Quotient = <() as PrivateDiv<N, D, Q, R, <UInt<Ui, Bi> as Sub<B1>>::Output>>::Quotient
type Remainder = <() as PrivateDiv<N, D, Q, R, <UInt<Ui, Bi> as Sub<B1>>::Output>>::Remainder
fn private_div_if_quotient( self, n: N, d: D, q: Q, r: R, i: UInt<Ui, Bi>, _: Less, ) -> Self::Quotient
fn private_div_if_remainder( self, n: N, d: D, q: Q, r: R, i: UInt<Ui, Bi>, _: Less, ) -> Self::Remainder
Source§impl<IU: InvertedUnsigned, U, B: Bit> PrivateInvert<IU> for UInt<U, B>
impl<IU: InvertedUnsigned, U, B: Bit> PrivateInvert<IU> for UInt<U, B>
type Output = <U as PrivateInvert<InvertedUInt<IU, B>>>::Output
fn private_invert(self, rhs: IU) -> Self::Output
Source§impl<U, B> PrivateLogarithm2 for UInt<U, B>
impl<U, B> PrivateLogarithm2 for UInt<U, B>
Source§impl<U, B, Ur> PrivateMax<Ur, Equal> for UInt<U, B>
impl<U, B, Ur> PrivateMax<Ur, Equal> for UInt<U, B>
Source§impl<U, B, Ur> PrivateMax<Ur, Greater> for UInt<U, B>
impl<U, B, Ur> PrivateMax<Ur, Greater> for UInt<U, B>
Source§impl<U, B, Ur> PrivateMax<Ur, Less> for UInt<U, B>
impl<U, B, Ur> PrivateMax<Ur, Less> for UInt<U, B>
Source§impl<U, B, Ur> PrivateMin<Ur, Equal> for UInt<U, B>
impl<U, B, Ur> PrivateMin<Ur, Equal> for UInt<U, B>
Source§impl<U, B, Ur> PrivateMin<Ur, Greater> for UInt<U, B>
impl<U, B, Ur> PrivateMin<Ur, Greater> for UInt<U, B>
Source§impl<U, B, Ur> PrivateMin<Ur, Less> for UInt<U, B>
impl<U, B, Ur> PrivateMin<Ur, Less> for UInt<U, B>
Source§impl<Un, Bn, Ui, Bi, B> PrivateSetBit<UInt<Ui, Bi>, B> for UInt<Un, Bn>
impl<Un, Bn, Ui, Bi, B> PrivateSetBit<UInt<Ui, Bi>, B> for UInt<Un, Bn>
Source§impl<Un, Bn, B> PrivateSetBit<UTerm, B> for UInt<Un, Bn>
impl<Un, Bn, B> PrivateSetBit<UTerm, B> for UInt<Un, Bn>
Source§impl<U, Ba, Bb> PrivateSquareRoot for UInt<UInt<U, Ba>, Bb>
impl<U, Ba, Bb> PrivateSquareRoot for UInt<UInt<U, Ba>, Bb>
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>
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§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>
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§impl<Ul, Ur: Unsigned> PrivateSub<UInt<Ur, B1>> for UInt<Ul, B0>
UInt<Ul, B0> - UInt<Ur, B1> = UInt<(Ul - Ur) - B1, B1>
impl<Ul, Ur: Unsigned> PrivateSub<UInt<Ur, B1>> for UInt<Ul, B0>
UInt<Ul, B0> - UInt<Ur, B1> = UInt<(Ul - Ur) - B1, 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>
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§impl<Ul, Ur: Unsigned> PrivateXor<UInt<Ur, B0>> for UInt<Ul, B0>where
Ul: PrivateXor<Ur> + Unsigned,
UInt<Ul, B0> ^ UInt<Ur, B0> = UInt<Ul ^ Ur, B0>
impl<Ul, Ur: Unsigned> PrivateXor<UInt<Ur, B0>> for UInt<Ul, B0>where
Ul: PrivateXor<Ur> + Unsigned,
UInt<Ul, B0> ^ UInt<Ur, B0> = UInt<Ul ^ Ur, B0>
Source§impl<Ul, Ur: Unsigned> PrivateXor<UInt<Ur, B0>> for UInt<Ul, B1>where
Ul: PrivateXor<Ur> + Unsigned,
UInt<Ul, B1> ^ UInt<Ur, B0> = UInt<Ul ^ Ur, B1>
impl<Ul, Ur: Unsigned> PrivateXor<UInt<Ur, B0>> for UInt<Ul, B1>where
Ul: PrivateXor<Ur> + Unsigned,
UInt<Ul, B1> ^ UInt<Ur, B0> = UInt<Ul ^ Ur, B1>
Source§impl<Ul, Ur: Unsigned> PrivateXor<UInt<Ur, B1>> for UInt<Ul, B0>where
Ul: PrivateXor<Ur> + Unsigned,
UInt<Ul, B0> ^ UInt<Ur, B1> = UInt<Ul ^ Ur, B1>
impl<Ul, Ur: Unsigned> PrivateXor<UInt<Ur, B1>> for UInt<Ul, B0>where
Ul: PrivateXor<Ur> + Unsigned,
UInt<Ul, B0> ^ UInt<Ur, B1> = UInt<Ul ^ Ur, B1>
Source§impl<Ul, Ur: Unsigned> PrivateXor<UInt<Ur, B1>> for UInt<Ul, B1>where
Ul: PrivateXor<Ur> + Unsigned,
UInt<Ul, B1> ^ UInt<Ur, B1> = UInt<Ul ^ Ur, B0>
impl<Ul, Ur: Unsigned> PrivateXor<UInt<Ur, B1>> for UInt<Ul, B1>where
Ul: PrivateXor<Ur> + Unsigned,
UInt<Ul, B1> ^ UInt<Ur, B1> = UInt<Ul ^ Ur, B0>
Source§impl<U: Unsigned, B: Bit> Shl<B0> for UInt<U, B>
Shifting left any unsigned by a zero bit: U << B0 = U
impl<U: Unsigned, B: Bit> Shl<B0> for UInt<U, B>
Shifting left any unsigned by a zero bit: U << B0 = U
Source§impl<U: Unsigned, B: Bit> Shl<B1> for UInt<U, B>
Shifting left a UInt by a one bit: UInt<U, B> << B1 = UInt<UInt<U, B>, B0>
impl<U: Unsigned, B: Bit> Shl<B1> for UInt<U, B>
Shifting left a UInt by a one bit: UInt<U, B> << B1 = UInt<UInt<U, B>, B0>
Source§impl<U: Unsigned, B: Bit, Ur: Unsigned, Br: Bit> Shl<UInt<Ur, Br>> for UInt<U, B>
Shifting left UInt by UInt: X << Y = UInt(X, B0) << (Y - 1)
impl<U: Unsigned, B: Bit, Ur: Unsigned, Br: Bit> Shl<UInt<Ur, Br>> for UInt<U, B>
Shifting left UInt by UInt: X << Y = UInt(X, B0) << (Y - 1)
Source§impl<U: Unsigned, B: Bit> Shl<UTerm> for UInt<U, B>
Shifting left UInt by UTerm: UInt<U, B> << UTerm = UInt<U, B>
impl<U: Unsigned, B: Bit> Shl<UTerm> for UInt<U, B>
Shifting left UInt by UTerm: UInt<U, B> << UTerm = UInt<U, B>
Source§impl<U: Unsigned, B: Bit> Shr<B0> for UInt<U, B>
Shifting right any unsigned by a zero bit: U >> B0 = U
impl<U: Unsigned, B: Bit> Shr<B0> for UInt<U, B>
Shifting right any unsigned by a zero bit: U >> B0 = U
Source§impl<U: Unsigned, B: Bit> Shr<B1> for UInt<U, B>
Shifting right a UInt by a 1 bit: UInt<U, B> >> B1 = U
impl<U: Unsigned, B: Bit> Shr<B1> for UInt<U, B>
Shifting right a UInt by a 1 bit: UInt<U, B> >> B1 = U
Source§impl<U, B: Bit, Ur: Unsigned, Br: Bit> Shr<UInt<Ur, Br>> for UInt<U, B>
Shifting right UInt by UInt: UInt(U, B) >> Y = U >> (Y - 1)
impl<U, B: Bit, Ur: Unsigned, Br: Bit> Shr<UInt<Ur, Br>> for UInt<U, B>
Shifting right UInt by UInt: UInt(U, B) >> Y = U >> (Y - 1)
Source§impl<U: Unsigned, B: Bit> Shr<UTerm> for UInt<U, B>
Shifting right UInt by UTerm: UInt<U, B> >> UTerm = UInt<U, B>
impl<U: Unsigned, B: Bit> Shr<UTerm> for UInt<U, B>
Shifting right UInt by UTerm: UInt<U, B> >> UTerm = UInt<U, B>
Source§impl<Ul: Unsigned, Bl: Bit, Ur: Unsigned> Sub<Ur> for UInt<Ul, Bl>
Subtracting unsigned integers. We just do our PrivateSub and then Trim the output.
impl<Ul: Unsigned, Bl: Bit, Ur: Unsigned> Sub<Ur> for UInt<Ul, Bl>
Subtracting unsigned integers. We just do our PrivateSub and then Trim the output.
Source§impl<U: Unsigned, B: Bit> Unsigned for UInt<U, B>
impl<U: Unsigned, B: Bit> Unsigned for UInt<U, B>
const U8: u8
const U16: u16
const U32: u32
const U64: u64
const USIZE: usize
const I8: i8
const I16: i16
const I32: i32
const I64: i64
const ISIZE: isize
fn to_u8() -> u8
fn to_u16() -> u16
fn to_u32() -> u32
fn to_u64() -> u64
fn to_usize() -> usize
fn to_i8() -> i8
fn to_i16() -> i16
fn to_i32() -> i32
fn to_i64() -> i64
fn to_isize() -> isize
impl<U: Copy, B: Copy> Copy for UInt<U, B>
impl<U: Unsigned, B: Bit> NonZero for UInt<U, B>
impl<U: Unsigned + PowerOfTwo> PowerOfTwo for UInt<U, B0>
impl PowerOfTwo for UInt<UTerm, B1>
impl<U, B> StructuralPartialEq for UInt<U, B>
Auto Trait Implementations§
impl<U, B> Freeze for UInt<U, B>
impl<U, B> RefUnwindSafe for UInt<U, B>where
U: RefUnwindSafe,
B: RefUnwindSafe,
impl<U, B> Send for UInt<U, B>
impl<U, B> Sync for UInt<U, B>
impl<U, B> Unpin for UInt<U, B>
impl<U, B> UnwindSafe for UInt<U, B>where
U: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A, B> IsEqualPrivate<B, Equal> for A
impl<A, B> IsEqualPrivate<B, Equal> for A
Source§impl<A, B> IsEqualPrivate<B, Greater> for A
impl<A, B> IsEqualPrivate<B, Greater> for A
Source§impl<A, B> IsEqualPrivate<B, Less> for A
impl<A, B> IsEqualPrivate<B, Less> for A
Source§impl<A, B> IsGreaterOrEqualPrivate<B, Equal> for A
impl<A, B> IsGreaterOrEqualPrivate<B, Equal> for A
Source§impl<A, B> IsGreaterOrEqualPrivate<B, Greater> for A
impl<A, B> IsGreaterOrEqualPrivate<B, Greater> for A
Source§impl<A, B> IsGreaterOrEqualPrivate<B, Less> for A
impl<A, B> IsGreaterOrEqualPrivate<B, Less> for A
Source§impl<A, B> IsGreaterPrivate<B, Equal> for A
impl<A, B> IsGreaterPrivate<B, Equal> for A
Source§impl<A, B> IsGreaterPrivate<B, Greater> for A
impl<A, B> IsGreaterPrivate<B, Greater> for A
Source§impl<A, B> IsGreaterPrivate<B, Less> for A
impl<A, B> IsGreaterPrivate<B, Less> for A
Source§impl<A, B> IsLessOrEqualPrivate<B, Equal> for A
impl<A, B> IsLessOrEqualPrivate<B, Equal> for A
Source§impl<A, B> IsLessOrEqualPrivate<B, Greater> for A
impl<A, B> IsLessOrEqualPrivate<B, Greater> for A
Source§impl<A, B> IsLessOrEqualPrivate<B, Less> for A
impl<A, B> IsLessOrEqualPrivate<B, Less> for A
Source§impl<A, B> IsLessPrivate<B, Equal> for A
impl<A, B> IsLessPrivate<B, Equal> for A
Source§impl<A, B> IsLessPrivate<B, Greater> for A
impl<A, B> IsLessPrivate<B, Greater> for A
Source§impl<A, B> IsLessPrivate<B, Less> for A
impl<A, B> IsLessPrivate<B, Less> for A
Source§impl<A, B> IsNotEqualPrivate<B, Equal> for A
impl<A, B> IsNotEqualPrivate<B, Equal> for A
Source§impl<A, B> IsNotEqualPrivate<B, Greater> for A
impl<A, B> IsNotEqualPrivate<B, Greater> for A
Source§impl<A, B> IsNotEqualPrivate<B, Less> for A
impl<A, B> IsNotEqualPrivate<B, Less> for A
Source§impl<N> Logarithm2 for Nwhere
N: PrivateLogarithm2,
impl<N> Logarithm2 for Nwhere
N: PrivateLogarithm2,
Source§type Output = <N as PrivateLogarithm2>::Output
type Output = <N as PrivateLogarithm2>::Output
Source§impl<N, P> PrivateIntegerAdd<Equal, N> for P
impl<N, P> PrivateIntegerAdd<Equal, N> for P
Source§impl<N, P> PrivateIntegerAdd<Less, N> for P
impl<N, P> PrivateIntegerAdd<Less, N> for P
Source§impl<Y, X> PrivatePow<Y, UTerm> for X
impl<Y, X> PrivatePow<Y, UTerm> for X
type Output = Y
fn private_pow(self, y: Y, _: UTerm) -> <X as PrivatePow<Y, UTerm>>::Output
Source§impl<U> PrivateSub<UTerm> for Uwhere
U: Unsigned,
impl<U> PrivateSub<UTerm> for Uwhere
U: Unsigned,
type Output = U
fn private_sub(self, _: UTerm) -> <U as PrivateSub<UTerm>>::Output
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const SIZE: usize = _
#[doc(hidden)] const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)] const ALIGN: usize = _
#[doc(hidden)] const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read more