Integer

Trait Integer 

Source
pub trait Integer:
    Number
    + Eq
    + Ord
    + BitAnd<Output = Self>
    + BitAndAssign
    + BitOr<Output = Self>
    + BitOrAssign
    + BitXor<Output = Self>
    + BitXorAssign
    + Not<Output = Self>
    + Shl<Self, Output = Self>
    + Shl<i32, Output = Self>
    + ShlAssign<i32>
    + Shr<i32, Output = Self>
    + ShrAssign<i32> {
    const ZERO: Self;
    const ONE: Self;
    const TWO: Self;
    const MAX: Self;
    const MIN: Self;
    const BITS: usize;
Show 25 methods // Required methods fn leading_zeros(self) -> u32; fn trailing_zeros(self) -> u32; fn pow(self, exp: u32) -> Self; fn checked_pow(self, exp: u32) -> Option<Self>; fn overflowing_pow(self, exp: u32) -> (Self, bool); fn checked_add(self, i: Self) -> Option<Self>; fn checked_sub(self, i: Self) -> Option<Self>; fn checked_mul(self, i: Self) -> Option<Self>; fn overflowing_add(self, i: Self) -> (Self, bool); fn overflowing_sub(self, i: Self) -> (Self, bool); fn overflowing_mul(self, i: Self) -> (Self, bool); fn wrapping_add(self, i: Self) -> Self; fn wrapping_sub(self, i: Self) -> Self; fn wrapping_mul(self, i: Self) -> Self; fn wrapping_neg(self) -> Self; fn saturating_add(self, i: Self) -> Self; fn saturating_sub(self, i: Self) -> Self; fn saturating_mul(self, i: Self) -> Self; // Provided methods fn ceil_divmod(self, y: Self) -> (Self, i32) { ... } fn ceil_div(self, y: Self) -> Self { ... } fn ceil_mod(self, y: Self) -> i32 { ... } fn bit_length(self) -> u32 { ... } fn is_odd(self) -> bool { ... } fn is_even(self) -> bool { ... } fn overflow_digits(radix: u32) -> usize { ... }
}
Expand description

The base trait for all signed and unsigned integers.

Required Associated Constants§

Source

const ZERO: Self

A value equal to 0.

Source

const ONE: Self

A value equal to 1.

Source

const TWO: Self

A value equal to 2.

Source

const MAX: Self

The largest value that can be represented by this integer type.

See u32::MAX.

Source

const MIN: Self

The smallest value that can be represented by this integer type.

See u32::MIN.

Source

const BITS: usize

The size of this integer type in bits.

See u32::BITS.

Required Methods§

Source

fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary representation of self.

See u32::leading_zeros.

Source

fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representation of self.

See u32::trailing_zeros.

Source

fn pow(self, exp: u32) -> Self

Raises self to the power of exp, using exponentiation by squaring.

See u32::pow.

Source

fn checked_pow(self, exp: u32) -> Option<Self>

Checked exponentiation. Computes self.pow(exp), returning None if overflow occurred.

See u32::checked_pow.

Source

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Raises self to the power of exp, using exponentiation by squaring.

Returns a tuple of the exponentiation along with a bool indicating whether an overflow happened.

See u32::overflowing_pow.

Source

fn checked_add(self, i: Self) -> Option<Self>

Checked integer addition. Computes self + i, returning None if overflow occurred.

See u32::checked_add.

Source

fn checked_sub(self, i: Self) -> Option<Self>

Checked integer subtraction. Computes self - i, returning None if overflow occurred.

See u32::checked_sub.

Source

fn checked_mul(self, i: Self) -> Option<Self>

Checked integer multiplication. Computes self * rhs, returning None if overflow occurred.

See u32::checked_mul.

Source

fn overflowing_add(self, i: Self) -> (Self, bool)

Calculates self + i.

Returns a tuple of the addition along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned. See u32::overflowing_add.

Source

fn overflowing_sub(self, i: Self) -> (Self, bool)

Calculates self - i.

Returns a tuple of the addition along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned. See u32::overflowing_sub.

Source

fn overflowing_mul(self, i: Self) -> (Self, bool)

Calculates self * i.

Returns a tuple of the addition along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned. See u32::overflowing_mul.

Source

fn wrapping_add(self, i: Self) -> Self

Wrapping (modular) addition. Computes self + i, wrapping around at the boundary of the type.

See u32::wrapping_add.

Source

fn wrapping_sub(self, i: Self) -> Self

Wrapping (modular) subtraction. Computes self - i, wrapping around at the boundary of the type.

See u32::wrapping_sub.

Source

fn wrapping_mul(self, i: Self) -> Self

Wrapping (modular) multiplication. Computes self * i, wrapping around at the boundary of the type.

See u32::wrapping_mul.

Source

fn wrapping_neg(self) -> Self

Wrapping (modular) negation. Computes -self, wrapping around at the boundary of the type.

See u32::wrapping_neg.

Source

fn saturating_add(self, i: Self) -> Self

Saturating integer addition. Computes self + i, saturating at the numeric bounds instead of overflowing.

See u32::saturating_add.

Source

fn saturating_sub(self, i: Self) -> Self

Saturating integer subtraction. Computes self - i, saturating at the numeric bounds instead of overflowing.

See u32::saturating_sub.

Source

fn saturating_mul(self, i: Self) -> Self

Saturating integer multiplication. Computes self * i, saturating at the numeric bounds instead of overflowing.

See u32::saturating_mul.

Provided Methods§

Source

fn ceil_divmod(self, y: Self) -> (Self, i32)

Get the fast ceiling of the quotient from integer division.

The remainder may wrap to the numerical boundaries for the type. See u32::div_ceil.

§Examples
use lexical_util::num::Integer;

assert_eq!(250u16.ceil_divmod(10), (25, 0));
assert_eq!(256u16.ceil_divmod(10), (26, -4));
assert_eq!(i32::MAX.ceil_divmod(-2), (-0x3FFFFFFE, 3));

// notice how `-1` wraps since `i32` cannot hold `i128::MAX`.
assert_eq!((i128::MAX - 1).ceil_divmod(i128::MAX), (1, -1));
Source

fn ceil_div(self, y: Self) -> Self

Get the fast ceiling of the quotient from integer division.

This is identical to u32::div_ceil.

§Examples
use lexical_util::num::Integer;

assert_eq!(250u16.ceil_div(10), 25);
assert_eq!(256u16.ceil_div(10), 26);
assert_eq!(i32::MAX.ceil_div(-2), -0x3FFFFFFE);
assert_eq!((i128::MAX - 1).ceil_div(i128::MAX), 1);
Source

fn ceil_mod(self, y: Self) -> i32

Get the fast ceiling modulus from integer division.

The remainder is not guaranteed to be valid since it can overflow if the remainder is not 0. See Self::ceil_divmod.

§Examples
use lexical_util::num::Integer;

assert_eq!(250u16.ceil_mod(10), 0);
assert_eq!(256u16.ceil_mod(10), -4);
assert_eq!(i32::MAX.ceil_mod(-2), 3);

// notice how `-1` wraps since `i32` cannot hold `i128::MAX`.
assert_eq!((i128::MAX - 1).ceil_mod(i128::MAX), -1);
Source

fn bit_length(self) -> u32

Get the number of bits in a value.

§Examples
use lexical_util::num::Integer;

assert_eq!(1u64.bit_length(), 1);
assert_eq!(2u64.bit_length(), 2);
assert_eq!(3u64.bit_length(), 2);
assert_eq!(16u64.bit_length(), 5);
Source

fn is_odd(self) -> bool

Returns true if the least-significant bit is odd.

Source

fn is_even(self) -> bool

Returns true if the least-significant bit is even.

Source

fn overflow_digits(radix: u32) -> usize

Get the maximum number of digits before the slice will overflow.

This is effectively the floor(log(2^BITS-1, radix)), but we can try to go a bit lower without worrying too much.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Integer for i8

Source§

const ZERO: i8 = 0i8

Source§

const ONE: i8 = 1i8

Source§

const TWO: i8 = 2i8

Source§

const MAX: i8 = 127i8

Source§

const MIN: i8 = -128i8

Source§

const BITS: usize = 8usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for i16

Source§

const ZERO: i16 = 0i16

Source§

const ONE: i16 = 1i16

Source§

const TWO: i16 = 2i16

Source§

const MAX: i16 = 32_767i16

Source§

const MIN: i16 = -32_768i16

Source§

const BITS: usize = 16usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for i32

Source§

const ZERO: i32 = 0i32

Source§

const ONE: i32 = 1i32

Source§

const TWO: i32 = 2i32

Source§

const MAX: i32 = 2_147_483_647i32

Source§

const MIN: i32 = -2_147_483_648i32

Source§

const BITS: usize = 32usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for i64

Source§

const ZERO: i64 = 0i64

Source§

const ONE: i64 = 1i64

Source§

const TWO: i64 = 2i64

Source§

const MAX: i64 = 9_223_372_036_854_775_807i64

Source§

const MIN: i64 = -9_223_372_036_854_775_808i64

Source§

const BITS: usize = 64usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for i128

Source§

const ZERO: i128 = 0i128

Source§

const ONE: i128 = 1i128

Source§

const TWO: i128 = 2i128

Source§

const MAX: i128 = 170_141_183_460_469_231_731_687_303_715_884_105_727i128

Source§

const MIN: i128 = -170_141_183_460_469_231_731_687_303_715_884_105_728i128

Source§

const BITS: usize = 128usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for isize

Source§

const ZERO: isize = 0isize

Source§

const ONE: isize = 1isize

Source§

const TWO: isize = 2isize

Source§

const MAX: isize = 9_223_372_036_854_775_807isize

Source§

const MIN: isize = -9_223_372_036_854_775_808isize

Source§

const BITS: usize = 64usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for u8

Source§

const ZERO: u8 = 0u8

Source§

const ONE: u8 = 1u8

Source§

const TWO: u8 = 2u8

Source§

const MAX: u8 = 255u8

Source§

const MIN: u8 = 0u8

Source§

const BITS: usize = 8usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for u16

Source§

const ZERO: u16 = 0u16

Source§

const ONE: u16 = 1u16

Source§

const TWO: u16 = 2u16

Source§

const MAX: u16 = 65_535u16

Source§

const MIN: u16 = 0u16

Source§

const BITS: usize = 16usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for u32

Source§

const ZERO: u32 = 0u32

Source§

const ONE: u32 = 1u32

Source§

const TWO: u32 = 2u32

Source§

const MAX: u32 = 4_294_967_295u32

Source§

const MIN: u32 = 0u32

Source§

const BITS: usize = 32usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for u64

Source§

const ZERO: u64 = 0u64

Source§

const ONE: u64 = 1u64

Source§

const TWO: u64 = 2u64

Source§

const MAX: u64 = 18_446_744_073_709_551_615u64

Source§

const MIN: u64 = 0u64

Source§

const BITS: usize = 64usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for u128

Source§

const ZERO: u128 = 0u128

Source§

const ONE: u128 = 1u128

Source§

const TWO: u128 = 2u128

Source§

const MAX: u128 = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

Source§

const MIN: u128 = 0u128

Source§

const BITS: usize = 128usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Source§

impl Integer for usize

Source§

const ZERO: usize = 0usize

Source§

const ONE: usize = 1usize

Source§

const TWO: usize = 2usize

Source§

const MAX: usize = 18_446_744_073_709_551_615usize

Source§

const MIN: usize = 0usize

Source§

const BITS: usize = 64usize

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn checked_add(self, i: Self) -> Option<Self>

Source§

fn checked_sub(self, i: Self) -> Option<Self>

Source§

fn checked_mul(self, i: Self) -> Option<Self>

Source§

fn overflowing_add(self, i: Self) -> (Self, bool)

Source§

fn overflowing_sub(self, i: Self) -> (Self, bool)

Source§

fn overflowing_mul(self, i: Self) -> (Self, bool)

Source§

fn wrapping_add(self, i: Self) -> Self

Source§

fn wrapping_sub(self, i: Self) -> Self

Source§

fn wrapping_mul(self, i: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn pow(self, exp: u32) -> Self

Source§

fn checked_pow(self, exp: u32) -> Option<Self>

Source§

fn overflowing_pow(self, exp: u32) -> (Self, bool)

Source§

fn saturating_add(self, i: Self) -> Self

Source§

fn saturating_sub(self, i: Self) -> Self

Source§

fn saturating_mul(self, i: Self) -> Self

Implementors§