Struct libipld::cid::multihash::typenum::uint::UInt [−]
pub struct UInt<U, B> { /* fields omitted */ }
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
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>
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>
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>
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>
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>
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>,
type ArrayType
type ArrayType
Associated type representing the array type for the number
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>,
type ArrayType
type ArrayType
Associated type representing the array type for the number
impl<Ul, Bl, Ur> BitAnd<Ur> for UInt<Ul, Bl> where
Ul: Unsigned,
Ur: Unsigned,
Bl: Bit,
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,
Ur: Unsigned,
Bl: Bit,
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.
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>
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>
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>
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>
impl<Ul, Bl, Ur> BitXor<Ur> for UInt<Ul, Bl> where
Ul: Unsigned,
Ur: Unsigned,
Bl: Bit,
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,
Ur: Unsigned,
Bl: Bit,
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.
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
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
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
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
impl<Ul, Bl, Ur, Br> Div<UInt<Ur, Br>> for UInt<Ul, Bl> where
Ul: Unsigned,
Ur: Unsigned,
Br: Bit,
Bl: 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,
Ur: Unsigned,
Br: Bit,
Bl: 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<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
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
impl<Xp, Yp> Gcd<UInt<Yp, B1>> for UInt<Xp, B1> where
UInt<Xp, B1>: Max<UInt<Yp, B1>>,
UInt<Xp, B1>: Min<UInt<Yp, B1>>,
UInt<Yp, B1>: Max<UInt<Xp, B1>>,
UInt<Yp, 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>>,
UInt<Xp, B1>: Min<UInt<Yp, B1>>,
UInt<Yp, B1>: Max<UInt<Xp, B1>>,
UInt<Yp, 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.
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
impl<Un, Bn, Ui, Bi> GetBit<UInt<Ui, Bi>> for UInt<Un, Bn> where
Un: GetBit<<UInt<Ui, Bi> as Sub<B1>>::Output>,
UInt<Ui, Bi>: Copy,
UInt<Ui, Bi>: Sub<B1>,
impl<Un, Bn, Ui, Bi> GetBit<UInt<Ui, Bi>> for UInt<Un, Bn> where
Un: GetBit<<UInt<Ui, Bi> as Sub<B1>>::Output>,
UInt<Ui, Bi>: Copy,
UInt<Ui, Bi>: Sub<B1>,
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
impl<U, B, Ur> Max<Ur> for UInt<U, B> where
U: Unsigned,
B: Bit,
Ur: Unsigned,
UInt<U, B>: Cmp<Ur>,
UInt<U, B>: 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>,
UInt<U, B>: PrivateMax<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>,
UInt<U, B>: 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>,
UInt<U, B>: PrivateMin<Ur, <UInt<U, B> as Cmp<Ur>>::Output>,
impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B0> where
B: Bit,
Ul: Unsigned + Mul<UInt<Ur, B>>,
Ur: Unsigned,
impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B0> where
B: Bit,
Ul: Unsigned + Mul<UInt<Ur, B>>,
Ur: Unsigned,
UInt<Ul, B0> * UInt<Ur, B> = UInt<(Ul * UInt<Ur, B>), B0>
impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B1> where
B: Bit,
Ul: Unsigned + Mul<UInt<Ur, B>>,
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
B: Bit,
Ul: Unsigned + Mul<UInt<Ur, B>>,
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>
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,
impl<Ur, Br> PartialDiv<UInt<Ur, Br>> for UTerm where
Ur: Unsigned,
Br: Bit,
impl<Ur, Br> PartialDiv<UInt<Ur, Br>> for UTerm where
Ur: Unsigned,
Br: Bit,
pub fn partial_div(
self,
UInt<Ur, Br>
) -> <UTerm as PartialDiv<UInt<Ur, Br>>>::Output
pub fn partial_div(
self,
UInt<Ur, Br>
) -> <UTerm as PartialDiv<UInt<Ur, Br>>>::Output
Method for performing the division
impl<Ul, Bl, Ur, Br> PartialDiv<UInt<Ur, Br>> for UInt<Ul, Bl> where
Ul: Unsigned,
Ur: Unsigned,
Br: Bit,
Bl: Bit,
UInt<Ul, Bl>: Div<UInt<Ur, Br>>,
UInt<Ul, Bl>: Rem<UInt<Ur, Br>>,
<UInt<Ul, Bl> as Rem<UInt<Ur, Br>>>::Output == UTerm,
impl<Ul, Bl, Ur, Br> PartialDiv<UInt<Ur, Br>> for UInt<Ul, Bl> where
Ul: Unsigned,
Ur: Unsigned,
Br: Bit,
Bl: Bit,
UInt<Ul, Bl>: Div<UInt<Ur, Br>>,
UInt<Ul, Bl>: Rem<UInt<Ur, Br>>,
<UInt<Ul, Bl> as Rem<UInt<Ur, Br>>>::Output == UTerm,
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>,
pub fn partial_cmp(&self, other: &UInt<U, B>) -> Option<Ordering>
pub fn partial_cmp(&self, other: &UInt<U, B>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<Ul, Bl, Ur, Br> Rem<UInt<Ur, Br>> for UInt<Ul, Bl> where
Ul: Unsigned,
Ur: Unsigned,
Br: Bit,
Bl: 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,
Ur: Unsigned,
Br: Bit,
Bl: 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<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
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>
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)
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>
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
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
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)
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>
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>
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>
impl<Ul, Bl, Ur> Sub<Ur> for UInt<Ul, Bl> where
Ul: Unsigned,
Ur: Unsigned,
Bl: Bit,
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,
Ur: Unsigned,
Bl: Bit,
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.
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,
pub const U8: u8
pub const U16: u16
pub const U32: u32
pub const U64: u64
pub const USIZE: usize
pub const I8: i8
pub const I16: i16
pub const I32: i32
pub const I64: i64
pub const ISIZE: isize
pub fn to_u8() -> u8
pub fn to_u16() -> u16
pub fn to_u32() -> u32
pub fn to_u64() -> u64
pub fn to_usize() -> usize
pub fn to_i8() -> i8
pub fn to_i16() -> i16
pub fn to_i32() -> i32
pub fn to_i64() -> i64
pub fn to_isize() -> isize
impl<U, B> Copy for UInt<U, B> where
U: Copy,
B: Copy,
U: Copy,
B: Copy,
impl<U, B> Eq for UInt<U, B> where
U: Eq,
B: Eq,
U: Eq,
B: Eq,
impl<U, B> NonZero for UInt<U, B> where
U: Unsigned,
B: Bit,
U: Unsigned,
B: Bit,
impl<U> PowerOfTwo for UInt<U, B0> where
U: Unsigned + PowerOfTwo,
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,
B: RefUnwindSafe,
U: RefUnwindSafe,
impl<U, B> Send for UInt<U, B> where
B: Send,
U: Send,
B: Send,
U: Send,
impl<U, B> Sync for UInt<U, B> where
B: Sync,
U: Sync,
B: Sync,
U: Sync,
impl<U, B> Unpin for UInt<U, B> where
B: Unpin,
U: Unpin,
B: Unpin,
U: Unpin,
impl<U, B> UnwindSafe for UInt<U, B> where
B: UnwindSafe,
U: UnwindSafe,
B: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<N> Logarithm2 for N where
N: PrivateLogarithm2,
impl<N> Logarithm2 for N where
N: PrivateLogarithm2,
type Output = <N as PrivateLogarithm2>::Output
type Output = <N as PrivateLogarithm2>::Output
The result of the integer binary logarithm.
impl<T> References<RawCodec> for T
[src]
impl<T> References<RawCodec> for T
[src]impl<N, I, B> SetBit<I, B> for N where
N: PrivateSetBit<I, B>,
<N as PrivateSetBit<I, B>>::Output: Trim,
impl<N, I, B> SetBit<I, B> for N where
N: PrivateSetBit<I, B>,
<N as PrivateSetBit<I, B>>::Output: Trim,
impl<N> SquareRoot for N where
N: PrivateSquareRoot,
impl<N> SquareRoot for N where
N: PrivateSquareRoot,
type Output = <N as PrivateSquareRoot>::Output
type Output = <N as PrivateSquareRoot>::Output
The result of the integer square root.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> Size for T where
T: 'static + ArrayLength<u8> + Debug + Default + Eq + Hash + Send + Sync,
[src]
T: 'static + ArrayLength<u8> + Debug + Default + Eq + Hash + Send + Sync,