funty

Trait Integral

Source
pub trait Integral:
    Numeric
    + Hash
    + Eq
    + Ord
    + Binary
    + LowerHex
    + UpperHex
    + Octal
    + BitAnd<Self, Output = Self>
    + for<'a> BitAnd<&'a Self, Output = Self>
    + BitAndAssign<Self>
    + for<'a> BitAndAssign<&'a Self>
    + BitOr<Self, Output = Self>
    + for<'a> BitOr<&'a Self, Output = Self>
    + BitOrAssign<Self>
    + for<'a> BitOrAssign<&'a Self>
    + BitXor<Self, Output = Self>
    + for<'a> BitXor<&'a Self, Output = Self>
    + BitXorAssign<Self>
    + for<'a> BitXorAssign<&'a Self>
    + Not<Output = Self>
    + TryFrom<i8>
    + TryFrom<u8>
    + TryFrom<i16>
    + TryFrom<u16>
    + TryFrom<i32>
    + TryFrom<u32>
    + TryFrom<i64>
    + TryFrom<u64>
    + TryFrom<i128>
    + TryFrom<u128>
    + TryFrom<isize>
    + TryFrom<usize>
    + TryInto<i8>
    + TryInto<u8>
    + TryInto<i16>
    + TryInto<u16>
    + TryInto<i32>
    + TryInto<u32>
    + TryInto<i64>
    + TryInto<u64>
    + TryInto<i128>
    + TryInto<u128>
    + TryInto<isize>
    + TryInto<usize>
    + Shl<Self, Output = Self>
    + for<'a> Shl<&'a Self, Output = Self>
    + ShlAssign<Self>
    + for<'a> ShlAssign<&'a Self>
    + Shr<Self, Output = Self>
    + for<'a> Shr<&'a Self, Output = Self>
    + ShrAssign<Self>
    + for<'a> ShrAssign<&'a Self>
    + Shl<i8, Output = Self>
    + for<'a> Shl<&'a i8, Output = Self>
    + ShlAssign<i8>
    + for<'a> ShlAssign<&'a i8>
    + Shr<i8, Output = Self>
    + for<'a> Shr<&'a i8, Output = Self>
    + ShrAssign<i8>
    + for<'a> ShrAssign<&'a i8>
    + Shl<u8, Output = Self>
    + for<'a> Shl<&'a u8, Output = Self>
    + ShlAssign<u8>
    + for<'a> ShlAssign<&'a u8>
    + Shr<u8, Output = Self>
    + for<'a> Shr<&'a u8, Output = Self>
    + ShrAssign<u8>
    + for<'a> ShrAssign<&'a u8>
    + Shl<i16, Output = Self>
    + for<'a> Shl<&'a i16, Output = Self>
    + ShlAssign<i16>
    + for<'a> ShlAssign<&'a i16>
    + Shr<i16, Output = Self>
    + for<'a> Shr<&'a i16, Output = Self>
    + ShrAssign<i16>
    + for<'a> ShrAssign<&'a i16>
    + Shl<u16, Output = Self>
    + for<'a> Shl<&'a u16, Output = Self>
    + ShlAssign<u16>
    + for<'a> ShlAssign<&'a u16>
    + Shr<u16, Output = Self>
    + for<'a> Shr<&'a u16, Output = Self>
    + ShrAssign<u16>
    + for<'a> ShrAssign<&'a u16>
    + Shl<i32, Output = Self>
    + for<'a> Shl<&'a i32, Output = Self>
    + ShlAssign<i32>
    + for<'a> ShlAssign<&'a i32>
    + Shr<i32, Output = Self>
    + for<'a> Shr<&'a i32, Output = Self>
    + ShrAssign<i32>
    + for<'a> ShrAssign<&'a i32>
    + Shl<u32, Output = Self>
    + for<'a> Shl<&'a u32, Output = Self>
    + ShlAssign<u32>
    + for<'a> ShlAssign<&'a u32>
    + Shr<u32, Output = Self>
    + for<'a> Shr<&'a u32, Output = Self>
    + ShrAssign<u32>
    + for<'a> ShrAssign<&'a u32>
    + Shl<i64, Output = Self>
    + for<'a> Shl<&'a i64, Output = Self>
    + ShlAssign<i64>
    + for<'a> ShlAssign<&'a i64>
    + Shr<i64, Output = Self>
    + for<'a> Shr<&'a i64, Output = Self>
    + ShrAssign<i64>
    + for<'a> ShrAssign<&'a i64>
    + Shl<u64, Output = Self>
    + for<'a> Shl<&'a u64, Output = Self>
    + ShlAssign<u64>
    + for<'a> ShlAssign<&'a u64>
    + Shr<u64, Output = Self>
    + for<'a> Shr<&'a u64, Output = Self>
    + ShrAssign<u64>
    + for<'a> ShrAssign<&'a u64>
    + Shl<i128, Output = Self>
    + for<'a> Shl<&'a i128, Output = Self>
    + ShlAssign<i128>
    + for<'a> ShlAssign<&'a i128>
    + Shr<i128, Output = Self>
    + for<'a> Shr<&'a i128, Output = Self>
    + ShrAssign<i128>
    + for<'a> ShrAssign<&'a i128>
    + Shl<u128, Output = Self>
    + for<'a> Shl<&'a u128, Output = Self>
    + ShlAssign<u128>
    + for<'a> ShlAssign<&'a u128>
    + Shr<u128, Output = Self>
    + for<'a> Shr<&'a u128, Output = Self>
    + ShrAssign<u128>
    + for<'a> ShrAssign<&'a u128>
    + Shl<isize, Output = Self>
    + for<'a> Shl<&'a isize, Output = Self>
    + ShlAssign<isize>
    + for<'a> ShlAssign<&'a isize>
    + Shr<isize, Output = Self>
    + for<'a> Shr<&'a isize, Output = Self>
    + ShrAssign<isize>
    + for<'a> ShrAssign<&'a isize>
    + Shl<usize, Output = Self>
    + for<'a> Shl<&'a usize, Output = Self>
    + ShlAssign<usize>
    + for<'a> ShlAssign<&'a usize>
    + Shr<usize, Output = Self>
    + for<'a> Shr<&'a usize, Output = Self>
    + ShrAssign<usize>
    + for<'a> ShrAssign<&'a usize> {
    const ZERO: Self;
    const ONE: Self;
    const MIN: Self;
    const MAX: Self;
    const BITS: u32;
Show 57 methods // Required methods fn min_value() -> Self; fn max_value() -> Self; fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>; fn count_ones(self) -> u32; fn count_zeros(self) -> u32; fn leading_zeros(self) -> u32; fn trailing_zeros(self) -> u32; fn leading_ones(self) -> u32; fn trailing_ones(self) -> u32; fn rotate_left(self, n: u32) -> Self; fn rotate_right(self, n: u32) -> Self; fn swap_bytes(self) -> Self; fn reverse_bits(self) -> Self; fn from_be(self) -> Self; fn from_le(self) -> Self; fn to_be(self) -> Self; fn to_le(self) -> Self; fn checked_add(self, rhs: Self) -> Option<Self>; fn checked_sub(self, rhs: Self) -> Option<Self>; fn checked_mul(self, rhs: Self) -> Option<Self>; fn checked_div(self, rhs: Self) -> Option<Self>; fn checked_div_euclid(self, rhs: Self) -> Option<Self>; fn checked_rem(self, rhs: Self) -> Option<Self>; fn checked_rem_euclid(self, rhs: Self) -> Option<Self>; fn checked_neg(self) -> Option<Self>; fn checked_shl(self, rhs: u32) -> Option<Self>; fn checked_shr(self, rhs: u32) -> Option<Self>; fn checked_pow(self, rhs: u32) -> Option<Self>; fn saturating_add(self, rhs: Self) -> Self; fn saturating_sub(self, rhs: Self) -> Self; fn saturating_mul(self, rhs: Self) -> Self; fn saturating_pow(self, rhs: u32) -> Self; fn wrapping_add(self, rhs: Self) -> Self; fn wrapping_sub(self, rhs: Self) -> Self; fn wrapping_mul(self, rhs: Self) -> Self; fn wrapping_div(self, rhs: Self) -> Self; fn wrapping_div_euclid(self, rhs: Self) -> Self; fn wrapping_rem(self, rhs: Self) -> Self; fn wrapping_rem_euclid(self, rhs: Self) -> Self; fn wrapping_neg(self) -> Self; fn wrapping_shl(self, rhs: u32) -> Self; fn wrapping_shr(self, rhs: u32) -> Self; fn wrapping_pow(self, rhs: u32) -> Self; fn overflowing_add(self, rhs: Self) -> (Self, bool); fn overflowing_sub(self, rhs: Self) -> (Self, bool); fn overflowing_mul(self, rhs: Self) -> (Self, bool); fn overflowing_div(self, rhs: Self) -> (Self, bool); fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool); fn overflowing_rem(self, rhs: Self) -> (Self, bool); fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool); fn overflowing_neg(self) -> (Self, bool); fn overflowing_shl(self, rhs: u32) -> (Self, bool); fn overflowing_shr(self, rhs: u32) -> (Self, bool); fn overflowing_pow(self, rhs: u32) -> (Self, bool); fn pow(self, rhs: u32) -> Self; fn div_euclid(self, rhs: Self) -> Self; fn rem_euclid(self, rhs: Self) -> Self;
}
Expand description

Declare that a type is a fixed-point integer.

This unifies all of the signed and unsigned integral types.

Required Associated Constants§

Source

const ZERO: Self

The type’s zero value.

Source

const ONE: Self

The type’s step value.

Source

const MIN: Self

The type’s minimum value. This is zero for unsigned integers.

Source

const MAX: Self

The type’s maximum value.

Source

const BITS: u32

The size of this type in bits.

Required Methods§

Source

fn min_value() -> Self

Returns the smallest value that can be represented by this integer type.

Source

fn max_value() -> Self

Returns the largest value that can be represented by this integer type.

Source

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Converts a string slice in a given base to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace represent an error. Digits are a subset of these characters, depending on radix:

  • 0-9
  • a-z
  • A-Z
§Panics

This function panics if radix is not in the range from 2 to 36.

Source

fn count_ones(self) -> u32

Returns the number of ones in the binary representation of self.

Source

fn count_zeros(self) -> u32

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

Source

fn leading_zeros(self) -> u32

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

Source

fn trailing_zeros(self) -> u32

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

Source

fn leading_ones(self) -> u32

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

Source

fn trailing_ones(self) -> u32

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

Source

fn rotate_left(self, n: u32) -> Self

Shifts the bits to the left by a specified amount, n, wrapping the truncated bits to the end of the resulting integer.

Please note this isn’t the same operation as the << shifting operator!

Source

fn rotate_right(self, n: u32) -> Self

Shifts the bits to the right by a specified amount, n, wrapping the truncated bits to the beginning of the resulting integer.

Please note this isn’t the same operation as the >> shifting operator!

Source

fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

Source

fn reverse_bits(self) -> Self

Reverses the bit pattern of the integer.

Source

fn from_be(self) -> Self

Converts an integer from big endian to the target’s endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

Source

fn from_le(self) -> Self

Converts an integer frm little endian to the target’s endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

Source

fn to_be(self) -> Self

Converts self to big endian from the target’s endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

Source

fn to_le(self) -> Self

Converts self to little endian from the target’s endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

Source

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

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

Source

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

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

Source

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

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

Source

fn checked_div(self, rhs: Self) -> Option<Self>

Checked integer division. Computes self / rhs, returning None if rhs == 0 or the division results in overflow.

Source

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Checked Euclidean division. Computes self.div_euclid(rhs), returning None if rhs == 0 or the division results in overflow.

Source

fn checked_rem(self, rhs: Self) -> Option<Self>

Checked integer remainder. Computes self % rhs, returning None if rhs == 0 or the division results in overflow.

Source

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Checked Euclidean remainder. Computes self.rem_euclid(rhs), returning None if rhs == 0 or the division results in overflow.

Source

fn checked_neg(self) -> Option<Self>

Checked negation. Computes -self, returning None if self == MIN.

Note that negating any positive integer will overflow.

Source

fn checked_shl(self, rhs: u32) -> Option<Self>

Checked shift left. Computes self << rhs, returning None if rhs is larger than or equal to the number of bits in self.

Source

fn checked_shr(self, rhs: u32) -> Option<Self>

Checked shift right. Computes self >> rhs, returning None if rhs is larger than or equal to the number of bits in self.

Source

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

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

Source

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

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

Source

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

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

Source

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

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

Source

fn saturating_pow(self, rhs: u32) -> Self

Saturating integer exponentiation. Computes self.pow(exp), saturating at the numeric bounds instead of overflowing.

Source

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

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

Source

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

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

Source

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

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

Source

fn wrapping_div(self, rhs: Self) -> Self

Wrapping (modular) division. Computes self / rhs, wrapping around at the boundary of the type.

§Signed Integers

The only case where such wrapping can occur is when one divides MIN / -1 on a signed type (where MIN is the negative minimal value for the type); this is equivalent to -MIN, a positive value that is too large to represent in the type. In such a case, this function returns MIN itself.

§Unsigned Integers

Wrapping (modular) division. Computes self / rhs. Wrapped division on unsigned types is just normal division. There’s no way wrapping could ever happen. This function exists, so that all operations are accounted for in the wrapping operations.

§Panics

This function will panic if rhs is 0.

Source

fn wrapping_div_euclid(self, rhs: Self) -> Self

Wrapping Euclidean division. Computes self.div_euclid(rhs), wrapping around at the boundary of the type.

§Signed Types

Wrapping will only occur in MIN / -1 on a signed type (where MIN is the negative minimal value for the type). This is equivalent to -MIN, a positive value that is too large to represent in the type. In this case, this method returns MIN itself.

§Unsigned Types

Wrapped division on unsigned types is just normal division. There’s no way wrapping could ever happen. This function exists, so that all operations are accounted for in the wrapping operations. Since, for the positive integers, all common definitions of division are equal, this is exactly equal to self.wrapping_div(rhs).

§Panics

This function will panic if rhs is 0.

Source

fn wrapping_rem(self, rhs: Self) -> Self

Wrapping (modular) remainder. Computes self % rhs, wrapping around at the boundary of the type.

§Signed Integers

Such wrap-around never actually occurs mathematically; implementation artifacts make x % y invalid for MIN / -1 on a signed type (where MIN is the negative minimal value). In such a case, this function returns 0.

§Unsigned Integers

Wrapped remainder calculation on unsigned types is just the regular remainder calculation. There’s no way wrapping could ever happen. This function exists, so that all operations are accounted for in the wrapping operations.

§Panics

This function will panic if rhs is 0.

Source

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Wrapping Euclidean remainder. Computes self.rem_euclid(rhs), wrapping around at the boundary of the type.

§Signed Integers

Wrapping will only occur in MIN % -1 on a signed type (where MIN is the negative minimal value for the type). In this case, this method returns 0.

§Unsigned Integers

Wrapped modulo calculation on unsigned types is just the regular remainder calculation. There’s no way wrapping could ever happen. This function exists, so that all operations are accounted for in the wrapping operations. Since, for the positive integers, all common definitions of division are equal, this is exactly equal to self.wrapping_rem(rhs).

§Panics

This function will panic if rhs is 0.

Source

fn wrapping_neg(self) -> Self

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

§Signed Integers

The only case where such wrapping can occur is when one negates MIN on a signed type (where MIN is the negative minimal value for the type); this is a positive value that is too large to represent in the type. In such a case, this function returns MIN itself.

§Unsigned Integers

Since unsigned types do not have negative equivalents all applications of this function will wrap (except for -0). For values smaller than the corresponding signed type’s maximum the result is the same as casting the corresponding signed value. Any larger values are equivalent to MAX + 1 - (val - MAX - 1) where MAX is the corresponding signed type’s maximum.

Source

fn wrapping_shl(self, rhs: u32) -> Self

Panic-free bitwise shift-left; yields self << mask(rhs), where mask removes any high-order bits of rhs that would cause the shift to exceed the bit-width of the type.

Note that this is not the same as a rotate-left; the RHS of a wrapping shift-left is restricted to the range of the type, rather than the bits shifted out of the LHS being returned to the other end. The primitive integer types all implement a rotate_left function, which may be what you want instead.

Source

fn wrapping_shr(self, rhs: u32) -> Self

Panic-free bitwise shift-right; yields self >> mask(rhs), where mask removes any high-order bits of rhs that would cause the shift to exceed the bit-width of the type.

Note that this is not the same as a rotate-right; the RHS of a wrapping shift-right is restricted to the range of the type, rather than the bits shifted out of the LHS being returned to the other end. The primitive integer types all implement a rotate_right function, which may be what you want instead.

Source

fn wrapping_pow(self, rhs: u32) -> Self

Wrapping (modular) exponentiation. Computes self.pow(exp), wrapping around at the boundary of the type.

Source

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

Calculates self + rhs

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.

Source

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

Calculates self - rhs

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

Source

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

Calculates the multiplication of self and rhs.

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

Source

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Calculates the divisor when self is divided by rhs.

Returns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would occur then self is returned.

§Panics

This function will panic if rhs is 0.

Source

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Calculates the quotient of Euclidean division self.div_euclid(rhs).

Returns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would occur then self is returned.

§Panics

This function will panic if rhs is 0.

Source

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Calculates the remainder when self is divided by rhs.

Returns a tuple of the remainder after dividing along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would occur then 0 is returned.

§Panics

This function will panic if rhs is 0.

Source

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Overflowing Euclidean remainder. Calculates self.rem_euclid(rhs).

Returns a tuple of the remainder after dividing along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would occur then 0 is returned.

§Panics

This function will panic if rhs is 0.

Source

fn overflowing_neg(self) -> (Self, bool)

Negates self, overflowing if this is equal to the minimum value.

Returns a tuple of the negated version of self along with a boolean indicating whether an overflow happened. If self is the minimum value (e.g., i32::MIN for values of type i32), then the minimum value will be returned again and true will be returned for an overflow happening.

Source

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Shifts self left by rhs bits.

Returns a tuple of the shifted version of self along with a boolean indicating whether the shift value was larger than or equal to the number of bits. If the shift value is too large, then value is masked (N-1) where N is the number of bits, and this value is then used to perform the shift.

Source

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Shifts self right by rhs bits.

Returns a tuple of the shifted version of self along with a boolean indicating whether the shift value was larger than or equal to the number of bits. If the shift value is too large, then value is masked (N-1) where N is the number of bits, and this value is then used to perform the shift.

Source

fn overflowing_pow(self, rhs: 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.

Source

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

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

Source

fn div_euclid(self, rhs: Self) -> Self

Calculates the quotient of Euclidean division of self by rhs.

This computes the integer n such that self = n * rhs + self.rem_euclid(rhs), with 0 <= self.rem_euclid(rhs) < rhs.

In other words, the result is self / rhs rounded to the integer n such that self >= n * rhs. If self > 0, this is equal to round towards zero (the default in Rust); if self < 0, this is equal to round towards +/- infinity.

§Panics

This function will panic if rhs is 0 or the division results in overflow.

Source

fn rem_euclid(self, rhs: Self) -> Self

Calculates the least nonnegative remainder of self (mod rhs).

This is done as if by the Euclidean division algorithm – given r = self.rem_euclid(rhs), self = rhs * self.div_euclid(rhs) + r, and 0 <= r < abs(rhs).

§Panics

This function will panic if rhs is 0 or the division results in overflow.

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 Integral for i8

Source§

const ZERO: Self = 0i8

Source§

const ONE: Self = 1i8

Source§

const MIN: Self = -128i8

Source§

const MAX: Self = 127i8

Source§

const BITS: u32 = 8u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for i16

Source§

const ZERO: Self = 0i16

Source§

const ONE: Self = 1i16

Source§

const MIN: Self = -32_768i16

Source§

const MAX: Self = 32_767i16

Source§

const BITS: u32 = 16u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for i32

Source§

const ZERO: Self = 0i32

Source§

const ONE: Self = 1i32

Source§

const MIN: Self = -2_147_483_648i32

Source§

const MAX: Self = 2_147_483_647i32

Source§

const BITS: u32 = 32u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for i64

Source§

const ZERO: Self = 0i64

Source§

const ONE: Self = 1i64

Source§

const MIN: Self = -9_223_372_036_854_775_808i64

Source§

const MAX: Self = 9_223_372_036_854_775_807i64

Source§

const BITS: u32 = 64u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for i128

Source§

const ZERO: Self = 0i128

Source§

const ONE: Self = 1i128

Source§

const MIN: Self = -170_141_183_460_469_231_731_687_303_715_884_105_728i128

Source§

const MAX: Self = 170_141_183_460_469_231_731_687_303_715_884_105_727i128

Source§

const BITS: u32 = 128u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for isize

Source§

const ZERO: Self = 0isize

Source§

const ONE: Self = 1isize

Source§

const MIN: Self = -9_223_372_036_854_775_808isize

Source§

const MAX: Self = 9_223_372_036_854_775_807isize

Source§

const BITS: u32 = 64u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for u8

Source§

const ZERO: Self = 0u8

Source§

const ONE: Self = 1u8

Source§

const MIN: Self = 0u8

Source§

const MAX: Self = 255u8

Source§

const BITS: u32 = 8u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for u16

Source§

const ZERO: Self = 0u16

Source§

const ONE: Self = 1u16

Source§

const MIN: Self = 0u16

Source§

const MAX: Self = 65_535u16

Source§

const BITS: u32 = 16u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for u32

Source§

const ZERO: Self = 0u32

Source§

const ONE: Self = 1u32

Source§

const MIN: Self = 0u32

Source§

const MAX: Self = 4_294_967_295u32

Source§

const BITS: u32 = 32u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for u64

Source§

const ZERO: Self = 0u64

Source§

const ONE: Self = 1u64

Source§

const MIN: Self = 0u64

Source§

const MAX: Self = 18_446_744_073_709_551_615u64

Source§

const BITS: u32 = 64u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for u128

Source§

const ZERO: Self = 0u128

Source§

const ONE: Self = 1u128

Source§

const MIN: Self = 0u128

Source§

const MAX: Self = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

Source§

const BITS: u32 = 128u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

impl Integral for usize

Source§

const ZERO: Self = 0usize

Source§

const ONE: Self = 1usize

Source§

const MIN: Self = 0usize

Source§

const MAX: Self = 18_446_744_073_709_551_615usize

Source§

const BITS: u32 = 64u32

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>

Source§

fn count_ones(self) -> u32

Source§

fn count_zeros(self) -> u32

Source§

fn leading_zeros(self) -> u32

Source§

fn trailing_zeros(self) -> u32

Source§

fn leading_ones(self) -> u32

Source§

fn trailing_ones(self) -> u32

Source§

fn rotate_left(self, n: u32) -> Self

Source§

fn rotate_right(self, n: u32) -> Self

Source§

fn swap_bytes(self) -> Self

Source§

fn reverse_bits(self) -> Self

Source§

fn from_be(self) -> Self

Source§

fn from_le(self) -> Self

Source§

fn to_be(self) -> Self

Source§

fn to_le(self) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn checked_div(self, rhs: Self) -> Option<Self>

Source§

fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem(self, rhs: Self) -> Option<Self>

Source§

fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Source§

fn checked_neg(self) -> Option<Self>

Source§

fn checked_shl(self, rhs: u32) -> Option<Self>

Source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn saturating_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn wrapping_div(self, rhs: Self) -> Self

Source§

fn wrapping_div_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_rem(self, rhs: Self) -> Self

Source§

fn wrapping_rem_euclid(self, rhs: Self) -> Self

Source§

fn wrapping_neg(self) -> Self

Source§

fn wrapping_shl(self, rhs: u32) -> Self

Source§

fn wrapping_shr(self, rhs: u32) -> Self

Source§

fn wrapping_pow(self, rhs: u32) -> Self

Source§

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

Source§

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

Source§

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

Source§

fn overflowing_div(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Source§

fn overflowing_neg(self) -> (Self, bool)

Source§

fn overflowing_shl(self, rhs: u32) -> (Self, bool)

Source§

fn overflowing_shr(self, rhs: u32) -> (Self, bool)

Source§

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

Source§

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

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn rem_euclid(self, rhs: Self) -> Self

Implementors§