Struct oberon::inner_types::elliptic_curve::bigint::generic_array::typenum::UInt
source · 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<U> Add<B1> for UInt<U, B1>where
U: Unsigned + Add<B1>,
<U as Add<B1>>::Output: Unsigned,
impl<U> Add<B1> for UInt<U, B1>where U: Unsigned + Add<B1>, <U as Add<B1>>::Output: Unsigned,
UInt<U, B1> + B1 = UInt<U + B1, B0>
source§impl<Ul, Ur> Add<UInt<Ur, B0>> for UInt<Ul, B0>where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
impl<Ul, Ur> Add<UInt<Ur, B0>> for UInt<Ul, B0>where Ul: Unsigned + Add<Ur>, Ur: Unsigned,
UInt<Ul, B0> + UInt<Ur, B0> = UInt<Ul + Ur, B0>
source§impl<Ul, Ur> Add<UInt<Ur, B0>> for UInt<Ul, B1>where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
impl<Ul, Ur> Add<UInt<Ur, B0>> for UInt<Ul, B1>where Ul: Unsigned + Add<Ur>, Ur: Unsigned,
UInt<Ul, B1> + UInt<Ur, B0> = UInt<Ul + Ur, B1>
source§impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B0>where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B0>where Ul: Unsigned + Add<Ur>, Ur: Unsigned,
UInt<Ul, B0> + UInt<Ur, B1> = UInt<Ul + Ur, B1>
source§impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B1>where
Ul: Unsigned + Add<Ur>,
Ur: Unsigned,
<Ul as Add<Ur>>::Output: Add<B1>,
impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B1>where Ul: Unsigned + Add<Ur>, Ur: Unsigned, <Ul as Add<Ur>>::Output: Add<B1>,
UInt<Ul, B1> + UInt<Ur, B1> = UInt<(Ul + Ur) + B1, B0>
source§impl<U, B> Add<UTerm> for UInt<U, B>where
U: Unsigned,
B: Bit,
impl<U, B> Add<UTerm> for UInt<U, B>where U: Unsigned, B: Bit,
UInt<U, B> + UTerm = UInt<U, B>
§impl<T, N> ArrayLength<T> for UInt<N, B0>where
N: ArrayLength<T>,
impl<T, N> ArrayLength<T> for UInt<N, B0>where N: ArrayLength<T>,
§impl<T, N> ArrayLength<T> for UInt<N, B1>where
N: ArrayLength<T>,
impl<T, N> ArrayLength<T> for UInt<N, B1>where N: ArrayLength<T>,
source§impl<Ul, Bl, Ur> BitAnd<Ur> for UInt<Ul, Bl>where
Ul: Unsigned,
Bl: Bit,
Ur: Unsigned,
UInt<Ul, Bl>: PrivateAnd<Ur>,
<UInt<Ul, Bl> as PrivateAnd<Ur>>::Output: Trim,
impl<Ul, Bl, Ur> BitAnd<Ur> for UInt<Ul, Bl>where Ul: Unsigned, Bl: Bit, Ur: Unsigned, UInt<Ul, Bl>: PrivateAnd<Ur>, <UInt<Ul, Bl> as PrivateAnd<Ur>>::Output: Trim,
Anding unsigned integers.
We use our PrivateAnd
operator and then Trim
the output.
source§impl<Ul, Ur> BitOr<UInt<Ur, B0>> for UInt<Ul, B0>where
Ul: Unsigned + BitOr<Ur>,
Ur: Unsigned,
impl<Ul, Ur> BitOr<UInt<Ur, B0>> for UInt<Ul, B0>where Ul: Unsigned + BitOr<Ur>, Ur: Unsigned,
UInt<Ul, B0> | UInt<Ur, B0> = UInt<Ul | Ur, B0>
source§impl<Ul, Ur> BitOr<UInt<Ur, B0>> for UInt<Ul, B1>where
Ul: Unsigned + BitOr<Ur>,
Ur: Unsigned,
impl<Ul, Ur> BitOr<UInt<Ur, B0>> for UInt<Ul, B1>where Ul: Unsigned + BitOr<Ur>, Ur: Unsigned,
UInt<Ul, B1> | UInt<Ur, B0> = UInt<Ul | Ur, B1>
source§impl<Ul, Ur> BitOr<UInt<Ur, B1>> for UInt<Ul, B0>where
Ul: Unsigned + BitOr<Ur>,
Ur: Unsigned,
impl<Ul, Ur> BitOr<UInt<Ur, B1>> for UInt<Ul, B0>where Ul: Unsigned + BitOr<Ur>, Ur: Unsigned,
UInt<Ul, B0> | UInt<Ur, B1> = UInt<Ul | Ur, B1>
source§impl<Ul, Ur> BitOr<UInt<Ur, B1>> for UInt<Ul, B1>where
Ul: Unsigned + BitOr<Ur>,
Ur: Unsigned,
impl<Ul, Ur> BitOr<UInt<Ur, B1>> for UInt<Ul, B1>where Ul: Unsigned + BitOr<Ur>, Ur: Unsigned,
UInt<Ul, B1> | UInt<Ur, B1> = UInt<Ul | Ur, B1>
source§impl<Ul, Bl, Ur> BitXor<Ur> for UInt<Ul, Bl>where
Ul: Unsigned,
Bl: Bit,
Ur: Unsigned,
UInt<Ul, Bl>: PrivateXor<Ur>,
<UInt<Ul, Bl> as PrivateXor<Ur>>::Output: Trim,
impl<Ul, Bl, Ur> BitXor<Ur> for UInt<Ul, Bl>where Ul: Unsigned, Bl: Bit, Ur: Unsigned, UInt<Ul, Bl>: PrivateXor<Ur>, <UInt<Ul, Bl> as PrivateXor<Ur>>::Output: Trim,
Xoring unsigned integers.
We use our PrivateXor
operator and then Trim
the output.
source§impl<Ul, Ur> Cmp<UInt<Ur, B0>> for UInt<Ul, B0>where
Ul: Unsigned + PrivateCmp<Ur, Equal>,
Ur: Unsigned,
impl<Ul, Ur> Cmp<UInt<Ur, B0>> for UInt<Ul, B0>where Ul: Unsigned + PrivateCmp<Ur, Equal>, Ur: Unsigned,
UInt<Ul, B0>
cmp with UInt<Ur, B0>
: SoFar
is Equal
source§impl<Ul, Ur> Cmp<UInt<Ur, B0>> for UInt<Ul, B1>where
Ul: Unsigned + PrivateCmp<Ur, Greater>,
Ur: Unsigned,
impl<Ul, Ur> Cmp<UInt<Ur, B0>> for UInt<Ul, B1>where Ul: Unsigned + PrivateCmp<Ur, Greater>, Ur: Unsigned,
UInt<Ul, B1>
cmp with UInt<Ur, B0>
: SoFar
is Greater
source§impl<Ul, Ur> Cmp<UInt<Ur, B1>> for UInt<Ul, B0>where
Ul: Unsigned + PrivateCmp<Ur, Less>,
Ur: Unsigned,
impl<Ul, Ur> Cmp<UInt<Ur, B1>> for UInt<Ul, B0>where Ul: Unsigned + PrivateCmp<Ur, Less>, Ur: Unsigned,
UInt<Ul, B0>
cmp with UInt<Ur, B1>
: SoFar
is Less
source§impl<Ul, Ur> Cmp<UInt<Ur, B1>> for UInt<Ul, B1>where
Ul: Unsigned + PrivateCmp<Ur, Equal>,
Ur: Unsigned,
impl<Ul, Ur> Cmp<UInt<Ur, B1>> for UInt<Ul, B1>where Ul: Unsigned + PrivateCmp<Ur, Equal>, Ur: Unsigned,
UInt<Ul, B1>
cmp with UInt<Ur, B1>
: SoFar
is Equal
source§impl<Ul, Bl, Ur, Br> Div<UInt<Ur, Br>> for UInt<Ul, Bl>where
Ul: Unsigned,
Bl: Bit,
Ur: Unsigned,
Br: Bit,
UInt<Ul, Bl>: Len,
<UInt<Ul, Bl> as Len>::Output: Sub<B1>,
(): PrivateDiv<UInt<Ul, Bl>, UInt<Ur, Br>, UTerm, UTerm, <<UInt<Ul, Bl> as Len>::Output as Sub<B1>>::Output>,
impl<Ul, Bl, Ur, Br> Div<UInt<Ur, Br>> for UInt<Ul, Bl>where Ul: Unsigned, Bl: Bit, Ur: Unsigned, Br: Bit, UInt<Ul, Bl>: Len, <UInt<Ul, Bl> as Len>::Output: Sub<B1>, (): PrivateDiv<UInt<Ul, Bl>, UInt<Ur, Br>, UTerm, UTerm, <<UInt<Ul, Bl> as Len>::Output as Sub<B1>>::Output>,
source§impl<Xp, Yp> Gcd<UInt<Yp, B0>> for UInt<Xp, B0>where
Xp: Gcd<Yp>,
UInt<Xp, B0>: NonZero,
UInt<Yp, B0>: NonZero,
impl<Xp, Yp> Gcd<UInt<Yp, B0>> for UInt<Xp, B0>where Xp: Gcd<Yp>, UInt<Xp, B0>: NonZero, UInt<Yp, B0>: NonZero,
gcd(x, y) = 2*gcd(x/2, y/2) if both x and y even
source§impl<Xp, Yp> Gcd<UInt<Yp, B0>> for UInt<Xp, B1>where
UInt<Xp, B1>: Gcd<Yp>,
UInt<Yp, B0>: NonZero,
impl<Xp, Yp> Gcd<UInt<Yp, B0>> for UInt<Xp, B1>where UInt<Xp, B1>: Gcd<Yp>, UInt<Yp, B0>: NonZero,
gcd(x, y) = gcd(x, y/2) if x odd and y even
source§impl<Xp, Yp> Gcd<UInt<Yp, B1>> for UInt<Xp, B0>where
Xp: Gcd<UInt<Yp, B1>>,
UInt<Xp, B0>: NonZero,
impl<Xp, Yp> Gcd<UInt<Yp, B1>> for UInt<Xp, B0>where Xp: Gcd<UInt<Yp, B1>>, UInt<Xp, B0>: NonZero,
gcd(x, y) = gcd(x/2, y) if x even and y odd
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>>,
<UInt<Xp, B1> as Max<UInt<Yp, B1>>>::Output: Sub<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>,
<<UInt<Xp, B1> as Max<UInt<Yp, B1>>>::Output as Sub<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>>::Output: Gcd<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>,
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>>, <UInt<Xp, B1> as Max<UInt<Yp, B1>>>::Output: Sub<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>, <<UInt<Xp, B1> as Max<UInt<Yp, B1>>>::Output as Sub<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>>::Output: Gcd<<UInt<Xp, B1> as Min<UInt<Yp, B1>>>::Output>,
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<Un, Bn, Ui, Bi> GetBit<UInt<Ui, Bi>> for UInt<Un, Bn>where
UInt<Ui, Bi>: Copy + Sub<B1>,
Un: GetBit<<UInt<Ui, Bi> as Sub<B1>>::Output>,
impl<Un, Bn, Ui, Bi> GetBit<UInt<Ui, Bi>> for UInt<Un, Bn>where UInt<Ui, Bi>: Copy + Sub<B1>, Un: GetBit<<UInt<Ui, Bi> as Sub<B1>>::Output>,
source§impl<U, B> Len for UInt<U, B>where
U: Unsigned + Len,
B: Bit,
<U as Len>::Output: Add<B1>,
<<U as Len>::Output as Add<B1>>::Output: Unsigned,
impl<U, B> Len for UInt<U, B>where U: Unsigned + Len, B: Bit, <U as Len>::Output: Add<B1>, <<U as Len>::Output as Add<B1>>::Output: Unsigned,
Length of a bit is 1
source§impl<U, B, Ur> Max<Ur> for UInt<U, B>where
U: Unsigned,
B: Bit,
Ur: Unsigned,
UInt<U, B>: Cmp<Ur> + PrivateMax<Ur, <UInt<U, B> as Cmp<Ur>>::Output>,
impl<U, B, Ur> Max<Ur> for UInt<U, B>where U: Unsigned, B: Bit, Ur: Unsigned, UInt<U, B>: Cmp<Ur> + PrivateMax<Ur, <UInt<U, B> as Cmp<Ur>>::Output>,
source§impl<U, B, Ur> Min<Ur> for UInt<U, B>where
U: Unsigned,
B: Bit,
Ur: Unsigned,
UInt<U, B>: Cmp<Ur> + PrivateMin<Ur, <UInt<U, B> as Cmp<Ur>>::Output>,
impl<U, B, Ur> Min<Ur> for UInt<U, B>where U: Unsigned, B: Bit, Ur: Unsigned, UInt<U, B>: Cmp<Ur> + PrivateMin<Ur, <UInt<U, B> as Cmp<Ur>>::Output>,
source§impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B0>where
Ul: Unsigned + Mul<UInt<Ur, B>>,
B: Bit,
Ur: Unsigned,
impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B0>where Ul: Unsigned + Mul<UInt<Ur, B>>, B: Bit, Ur: Unsigned,
UInt<Ul, B0> * UInt<Ur, B> = UInt<(Ul * UInt<Ur, B>), B0>
source§impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B1>where
Ul: Unsigned + Mul<UInt<Ur, B>>,
B: Bit,
Ur: Unsigned,
UInt<<Ul as Mul<UInt<Ur, B>>>::Output, B0>: Add<UInt<Ur, B>>,
impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B1>where Ul: Unsigned + Mul<UInt<Ur, B>>, B: Bit, Ur: Unsigned, UInt<<Ul as Mul<UInt<Ur, B>>>::Output, B0>: Add<UInt<Ur, B>>,
UInt<Ul, B1> * UInt<Ur, B> = UInt<(Ul * UInt<Ur, B>), B0> + UInt<Ur, B>
source§impl<U, B> Ord for UInt<U, B>where
U: Ord,
B: Ord,
impl<U, B> Ord for UInt<U, B>where U: Ord, B: Ord,
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl<Ul, Bl, Ur, Br> PartialDiv<UInt<Ur, Br>> for UInt<Ul, Bl>where
Ul: Unsigned,
Bl: Bit,
Ur: Unsigned,
Br: Bit,
UInt<Ul, Bl>: Div<UInt<Ur, Br>> + Rem<UInt<Ur, Br>, Output = UTerm>,
impl<Ul, Bl, Ur, Br> PartialDiv<UInt<Ur, Br>> for UInt<Ul, Bl>where Ul: Unsigned, Bl: Bit, Ur: Unsigned, Br: Bit, UInt<Ul, Bl>: Div<UInt<Ur, Br>> + Rem<UInt<Ur, Br>, Output = UTerm>,
source§impl<U, B> PartialEq<UInt<U, B>> for UInt<U, B>where
U: PartialEq<U>,
B: PartialEq<B>,
impl<U, B> PartialEq<UInt<U, B>> for UInt<U, B>where U: PartialEq<U>, B: PartialEq<B>,
source§impl<U, B> PartialOrd<UInt<U, B>> for UInt<U, B>where
U: PartialOrd<U>,
B: PartialOrd<B>,
impl<U, B> PartialOrd<UInt<U, B>> for UInt<U, B>where U: PartialOrd<U>, B: PartialOrd<B>,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<Ul, Bl, Ur, Br> Rem<UInt<Ur, Br>> for UInt<Ul, Bl>where
Ul: Unsigned,
Bl: Bit,
Ur: Unsigned,
Br: Bit,
UInt<Ul, Bl>: Len,
<UInt<Ul, Bl> as Len>::Output: Sub<B1>,
(): PrivateDiv<UInt<Ul, Bl>, UInt<Ur, Br>, UTerm, UTerm, <<UInt<Ul, Bl> as Len>::Output as Sub<B1>>::Output>,
impl<Ul, Bl, Ur, Br> Rem<UInt<Ur, Br>> for UInt<Ul, Bl>where Ul: Unsigned, Bl: Bit, Ur: Unsigned, Br: Bit, UInt<Ul, Bl>: Len, <UInt<Ul, Bl> as Len>::Output: Sub<B1>, (): PrivateDiv<UInt<Ul, Bl>, UInt<Ur, Br>, UTerm, UTerm, <<UInt<Ul, Bl> as Len>::Output as Sub<B1>>::Output>,
source§impl<U, B> Shl<B0> for UInt<U, B>where
U: Unsigned,
B: Bit,
impl<U, B> Shl<B0> for UInt<U, B>where U: Unsigned, B: Bit,
Shifting left any unsigned by a zero bit: U << B0 = U
source§impl<U, B> Shl<B1> for UInt<U, B>where
U: Unsigned,
B: Bit,
impl<U, B> Shl<B1> for UInt<U, B>where U: Unsigned, B: Bit,
Shifting left a UInt
by a one bit: UInt<U, B> << B1 = UInt<UInt<U, B>, B0>
source§impl<U, B, Ur, Br> Shl<UInt<Ur, Br>> for UInt<U, B>where
U: Unsigned,
B: Bit,
Ur: Unsigned,
Br: Bit,
UInt<Ur, Br>: Sub<B1>,
UInt<UInt<U, B>, B0>: Shl<<UInt<Ur, Br> as Sub<B1>>::Output>,
impl<U, B, Ur, Br> Shl<UInt<Ur, Br>> for UInt<U, B>where U: Unsigned, B: Bit, Ur: Unsigned, Br: Bit, UInt<Ur, Br>: Sub<B1>, UInt<UInt<U, B>, B0>: Shl<<UInt<Ur, Br> as Sub<B1>>::Output>,
Shifting left UInt
by UInt
: X << Y
= UInt(X, B0) << (Y - 1)
source§impl<U, B> Shl<UTerm> for UInt<U, B>where
U: Unsigned,
B: Bit,
impl<U, B> Shl<UTerm> for UInt<U, B>where U: Unsigned, B: Bit,
Shifting left UInt
by UTerm
: UInt<U, B> << UTerm = UInt<U, B>
source§impl<U, B> Shr<B0> for UInt<U, B>where
U: Unsigned,
B: Bit,
impl<U, B> Shr<B0> for UInt<U, B>where U: Unsigned, B: Bit,
Shifting right any unsigned by a zero bit: U >> B0 = U
source§impl<U, B> Shr<B1> for UInt<U, B>where
U: Unsigned,
B: Bit,
impl<U, B> Shr<B1> for UInt<U, B>where U: Unsigned, B: Bit,
Shifting right a UInt
by a 1 bit: UInt<U, B> >> B1 = U
source§impl<U, B, Ur, Br> Shr<UInt<Ur, Br>> for UInt<U, B>where
U: Unsigned + Shr<<UInt<Ur, Br> as Sub<B1>>::Output>,
B: Bit,
Ur: Unsigned,
Br: Bit,
UInt<Ur, Br>: Sub<B1>,
impl<U, B, Ur, Br> Shr<UInt<Ur, Br>> for UInt<U, B>where U: Unsigned + Shr<<UInt<Ur, Br> as Sub<B1>>::Output>, B: Bit, Ur: Unsigned, Br: Bit, UInt<Ur, Br>: Sub<B1>,
Shifting right UInt
by UInt
: UInt(U, B) >> Y
= U >> (Y - 1)
source§impl<U, B> Shr<UTerm> for UInt<U, B>where
U: Unsigned,
B: Bit,
impl<U, B> Shr<UTerm> for UInt<U, B>where U: Unsigned, B: Bit,
Shifting right UInt
by UTerm
: UInt<U, B> >> UTerm = UInt<U, B>
source§impl<U> Sub<B1> for UInt<U, B0>where
U: Unsigned + Sub<B1>,
<U as Sub<B1>>::Output: Unsigned,
impl<U> Sub<B1> for UInt<U, B0>where U: Unsigned + Sub<B1>, <U as Sub<B1>>::Output: Unsigned,
UInt<U, B0> - B1 = UInt<U - B1, B1>
source§impl<U, B> Sub<B1> for UInt<UInt<U, B>, B1>where
U: Unsigned,
B: Bit,
impl<U, B> Sub<B1> for UInt<UInt<U, B>, B1>where U: Unsigned, B: Bit,
UInt<U, B1> - B1 = UInt<U, B0>
source§impl<Ul, Bl, Ur> Sub<Ur> for UInt<Ul, Bl>where
Ul: Unsigned,
Bl: Bit,
Ur: Unsigned,
UInt<Ul, Bl>: PrivateSub<Ur>,
<UInt<Ul, Bl> as PrivateSub<Ur>>::Output: Trim,
impl<Ul, Bl, Ur> Sub<Ur> for UInt<Ul, Bl>where Ul: Unsigned, Bl: Bit, Ur: Unsigned, UInt<Ul, Bl>: PrivateSub<Ur>, <UInt<Ul, Bl> as PrivateSub<Ur>>::Output: Trim,
Subtracting unsigned integers. We just do our PrivateSub
and then Trim
the output.
source§impl<U, B> Unsigned for UInt<U, B>where
U: Unsigned,
B: Bit,
impl<U, B> Unsigned for UInt<U, B>where U: Unsigned, B: Bit,
const U8: u8 = B::U8 | U::U8 << 1
const U16: u16 = B::U8 as u16 | U::U16 << 1
const U32: u32 = B::U8 as u32 | U::U32 << 1
const U64: u64 = B::U8 as u64 | U::U64 << 1
const USIZE: usize = B::U8 as usize | U::USIZE << 1
const I8: i8 = B::U8 as i8 | U::I8 << 1
const I16: i16 = B::U8 as i16 | U::I16 << 1
const I32: i32 = B::U8 as i32 | U::I32 << 1
const I64: i64 = B::U8 as i64 | U::I64 << 1
const ISIZE: isize = B::U8 as isize | U::ISIZE << 1
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, B> Copy for UInt<U, B>where U: Copy, B: Copy,
impl<U, B> Eq for UInt<U, B>where U: Eq, B: Eq,
impl<U, B> NonZero for UInt<U, B>where U: Unsigned, B: Bit,
impl<U> PowerOfTwo for UInt<U, B0>where U: Unsigned + PowerOfTwo,
impl PowerOfTwo for UInt<UTerm, B1>
impl<U, B> StructuralEq for UInt<U, B>
impl<U, B> StructuralPartialEq for UInt<U, B>
Auto Trait Implementations§
impl<U, B> RefUnwindSafe for UInt<U, B>where B: RefUnwindSafe, U: RefUnwindSafe,
impl<U, B> Send for UInt<U, B>where B: Send, U: Send,
impl<U, B> Sync for UInt<U, B>where B: Sync, U: Sync,
impl<U, B> Unpin for UInt<U, B>where B: Unpin, U: Unpin,
impl<U, B> UnwindSafe for UInt<U, B>where B: UnwindSafe, U: 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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,
source§impl<N> Logarithm2 for Nwhere
N: PrivateLogarithm2,
impl<N> Logarithm2 for Nwhere N: PrivateLogarithm2,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.source§impl<N, I, B> SetBit<I, B> for Nwhere
N: PrivateSetBit<I, B>,
<N as PrivateSetBit<I, B>>::Output: Trim,
impl<N, I, B> SetBit<I, B> for Nwhere N: PrivateSetBit<I, B>, <N as PrivateSetBit<I, B>>::Output: Trim,
source§impl<N> SquareRoot for Nwhere
N: PrivateSquareRoot,
impl<N> SquareRoot for Nwhere N: PrivateSquareRoot,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.