Trait concrete_commons::numeric::UnsignedInteger[][src]

pub trait UnsignedInteger: Numeric + Ord + Eq + Add<Self, Output = Self> + AddAssign<Self> + Div<Self, Output = Self> + DivAssign<Self> + Mul<Self, Output = Self> + MulAssign<Self> + Rem<Self, Output = Self> + RemAssign<Self> + Sub<Self, Output = Self> + SubAssign<Self> + BitAnd<Self, Output = Self> + BitAndAssign<Self> + BitOr<Self, Output = Self> + BitOrAssign<Self> + BitXor<Self, Output = Self> + BitXorAssign<Self> + Not<Output = Self> + Shl<usize, Output = Self> + ShlAssign<usize> + Shr<usize, Output = Self> + ShrAssign<usize> + CastFrom<f64> + CastInto<f64> {
    type Signed: SignedInteger<Unsigned = Self> + CastFrom<Self>;
    fn wrapping_add(self, other: Self) -> Self;
fn wrapping_sub(self, other: Self) -> Self;
fn wrapping_div(self, other: Self) -> Self;
fn wrapping_mul(self, other: Self) -> Self;
fn wrapping_neg(self) -> Self;
fn wrapping_pow(self, exp: u32) -> Self;
fn wrapping_shl(self, rhs: u32) -> Self;
fn wrapping_shr(self, rhs: u32) -> Self;
fn into_signed(self) -> Self::Signed;
fn to_bits_string(&self, block_length: usize) -> String; }
Expand description

A trait shared by all the unsigned integer types.

Associated Types

The signed type of the same precision.

Required methods

Compute an addition, modulo the max of the type.

Compute a subtraction, modulo the max of the type.

Compute a division, modulo the max of the type.

Compute a multiplication, modulo the max of the type.

Compute a negation, modulo the max of the type.

Compute an exponentiation, modulo the max of the type.

Panic free shift-left operation.

Panic free shift-right operation.

Returns the casting of the current value to the signed type of the same size.

Returns a bit representation of the integer, where blocks of length block_length are separated by whitespaces to increase the readability.

Implementations on Foreign Types

Implementors