pub unsafe trait Intwhere
Self: Int + 'static + Any + Binary + CloneToUninit + ConstParamTy_ + Copy + Debug + Default + Display + Eq + Freeze + From<bool> + From<i8> + FromStr + Hash + LowerExp + LowerHex + NumBufferTrait + Octal + Ord + PartialEq + PartialOrd + Product + RefUnwindSafe + Send + Step + StructuralPartialEq + Sum + Sync + Thin + ToOwned + ToString + TrustedStep + TryFrom<bool, Error = Infallible> + TryFrom<i128> + TryFrom<i16> + TryFrom<i32> + TryFrom<i64> + TryFrom<i8, Error = Infallible> + TryFrom<isize> + TryFrom<u128> + TryFrom<u16> + TryFrom<u32> + TryFrom<u64> + TryFrom<u8> + TryFrom<usize> + TryInto<i128> + TryInto<i16> + TryInto<i32> + TryInto<i64> + TryInto<i8> + TryInto<isize> + TryInto<u128> + TryInto<u16> + TryInto<u32> + TryInto<u64> + TryInto<u8> + TryInto<usize> + Unpin + UnwindSafe + UpperExp + UpperHex + UseCloned + Add<Output = Self> + BitAnd<Output = Self> + BitOr<Output = Self> + BitXor<Output = Self> + Div<Output = Self> + Mul<Output = Self> + Neg<Output = Self> + Not<Output = Self> + Rem<Output = Self> + Shl<Output = Self> + Shl<u8, Output = Self> + Shl<u16, Output = Self> + Shl<u32, Output = Self> + Shl<u64, Output = Self> + Shl<u128, Output = Self> + Shl<usize, Output = Self> + Shl<i8, Output = Self> + Shl<i16, Output = Self> + Shl<i32, Output = Self> + Shl<i64, Output = Self> + Shl<i128, Output = Self> + Shl<isize, Output = Self> + Shr<Output = Self> + Shr<u8, Output = Self> + Shr<u16, Output = Self> + Shr<u32, Output = Self> + Shr<u64, Output = Self> + Shr<u128, Output = Self> + Shr<usize, Output = Self> + Shr<i8, Output = Self> + Shr<i16, Output = Self> + Shr<i32, Output = Self> + Shr<i64, Output = Self> + Shr<i128, Output = Self> + Shr<isize, Output = Self> + Sub<Output = Self> + AddAssign + BitAndAssign + BitOrAssign + BitXorAssign + DivAssign + MulAssign + RemAssign + ShlAssign + ShlAssign<u8> + ShlAssign<u16> + ShlAssign<u32> + ShlAssign<u64> + ShlAssign<u128> + ShlAssign<usize> + ShlAssign<i8> + ShlAssign<i16> + ShlAssign<i32> + ShlAssign<i64> + ShlAssign<i128> + ShlAssign<isize> + ShrAssign + ShrAssign<u8> + ShrAssign<u16> + ShrAssign<u32> + ShrAssign<u64> + ShrAssign<u128> + ShrAssign<usize> + ShrAssign<i8> + ShrAssign<i16> + ShrAssign<i32> + ShrAssign<i64> + ShrAssign<i128> + ShrAssign<isize> + SubAssign,{
type Uint: Uint<Int = Self, Bytes = Self::Bytes>;
type Bytes: Array<Scalar = u8> + 'static + Any + CloneToUninit + ConstParamTy_ + Copy + Debug + Eq + Freeze + Hash + Ord + PartialEq + PartialEq<[u8]> + PartialOrd + RefUnwindSafe + Send + Sync + ToOwned + Unpin + UnwindSafe;
const BITS: u32;
const MIN: Self;
const MAX: Self;
const ZERO: Self;
const ONE: Self;
Show 132 methods
// Required methods
fn from_le(value: Self) -> Self;
fn from_be(value: Self) -> Self;
fn from_ne_bytes(bytes: Self::Bytes) -> Self;
fn from_le_bytes(bytes: Self::Bytes) -> Self;
fn from_be_bytes(bytes: Self::Bytes) -> Self;
fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>;
fn widening_mul(self, rhs: Self) -> (Self::Uint, Self);
fn div_floor(self, rhs: Self) -> Self;
fn div_euclid(self, rhs: Self) -> Self;
fn exact_div(self, rhs: Self) -> Self;
fn rem_euclid(self, rhs: Self) -> Self;
fn exact_shl(self, rhs: u32) -> Option<Self>;
fn exact_shr(self, rhs: u32) -> Option<Self>;
fn rotate_left(self, rhs: u32) -> Self;
fn rotate_right(self, rhs: u32) -> Self;
fn swap_bytes(self) -> Self;
fn reverse_bits(self) -> Self;
fn abs(self) -> Self;
fn unsigned_abs(self) -> Self::Uint;
fn pow(self, exp: u32) -> Self;
fn isqrt(self) -> Self;
fn ilog(self, base: Self) -> u32;
fn ilog2(self) -> u32;
fn ilog10(self) -> u32;
fn abs_diff(self, rhs: Self) -> Self::Uint;
fn midpoint(self, rhs: Self) -> Self;
fn next_multiple_of(self, rhs: Self) -> Self;
fn isolate_lowest_one(self) -> Self;
fn isolate_highest_one(self) -> Self;
fn lowest_one(self) -> Option<u32>;
fn highest_one(self) -> Option<u32>;
fn count_zeros(self) -> u32;
fn count_ones(self) -> u32;
fn leading_zeros(self) -> u32;
fn leading_ones(self) -> u32;
fn trailing_zeros(self) -> u32;
fn trailing_ones(self) -> u32;
fn signum(self) -> Self;
fn is_negative(self) -> bool;
fn is_positive(self) -> bool;
fn is_multiple_of(self, rhs: Self) -> bool;
fn checked_add(self, rhs: Self) -> Option<Self>;
fn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>;
fn checked_sub(self, rhs: Self) -> Option<Self>;
fn checked_sub_unsigned(self, rhs: Self::Uint) -> 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_exact_div(self, rhs: Self) -> Option<Self>;
fn checked_rem(self, rhs: Self) -> Option<Self>;
fn checked_rem_euclid(self, rhs: Self) -> Option<Self>;
fn checked_shl(self, rhs: u32) -> Option<Self>;
fn checked_shr(self, rhs: u32) -> Option<Self>;
fn checked_neg(self) -> Option<Self>;
fn checked_abs(self) -> Option<Self>;
fn checked_pow(self, exp: u32) -> Option<Self>;
fn checked_ilog(self, base: Self) -> Option<u32>;
fn checked_ilog2(self) -> Option<u32>;
fn checked_ilog10(self) -> Option<u32>;
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>;
fn strict_add(self, rhs: Self) -> Self;
fn strict_add_unsigned(self, rhs: Self::Uint) -> Self;
fn strict_sub(self, rhs: Self) -> Self;
fn strict_sub_unsigned(self, rhs: Self::Uint) -> Self;
fn strict_mul(self, rhs: Self) -> Self;
fn strict_div(self, rhs: Self) -> Self;
fn strict_div_euclid(self, rhs: Self) -> Self;
fn strict_rem(self, rhs: Self) -> Self;
fn strict_rem_euclid(self, rhs: Self) -> Self;
fn strict_shl(self, rhs: u32) -> Self;
fn strict_shr(self, rhs: u32) -> Self;
fn strict_neg(self) -> Self;
fn strict_abs(self) -> Self;
fn strict_pow(self, rhs: u32) -> Self;
unsafe fn unchecked_add(self, rhs: Self) -> Self;
unsafe fn unchecked_exact_div(self, rhs: Self) -> Self;
unsafe fn unchecked_sub(self, rhs: Self) -> Self;
unsafe fn unchecked_mul(self, rhs: Self) -> Self;
unsafe fn unchecked_shl(self, rhs: u32) -> Self;
unsafe fn unchecked_shr(self, rhs: u32) -> Self;
unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self;
unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self;
unsafe fn unchecked_neg(self) -> Self;
fn overflowing_add(self, rhs: Self) -> (Self, bool);
fn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool);
fn overflowing_sub(self, rhs: Self) -> (Self, bool);
fn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (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_shl(self, rhs: u32) -> (Self, bool);
fn overflowing_shr(self, rhs: u32) -> (Self, bool);
fn overflowing_neg(self) -> (Self, bool);
fn overflowing_abs(self) -> (Self, bool);
fn overflowing_pow(self, exp: u32) -> (Self, bool);
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool);
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self);
fn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Uint, Self);
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool);
fn wrapping_add(self, rhs: Self) -> Self;
fn wrapping_add_unsigned(self, rhs: Self::Uint) -> Self;
fn wrapping_sub(self, rhs: Self) -> Self;
fn wrapping_sub_unsigned(self, rhs: Self::Uint) -> 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_shl(self, rhs: u32) -> Self;
fn wrapping_shr(self, rhs: u32) -> Self;
fn wrapping_neg(self) -> Self;
fn wrapping_abs(self) -> Self;
fn wrapping_pow(self, exp: u32) -> Self;
fn saturating_add(self, rhs: Self) -> Self;
fn saturating_add_unsigned(self, rhs: Self::Uint) -> Self;
fn saturating_sub(self, rhs: Self) -> Self;
fn saturating_sub_unsigned(self, rhs: Self::Uint) -> Self;
fn saturating_mul(self, rhs: Self) -> Self;
fn saturating_div(self, rhs: Self) -> Self;
fn saturating_neg(self) -> Self;
fn saturating_abs(self) -> Self;
fn saturating_pow(self, exp: u32) -> Self;
fn unbounded_shl(self, rhs: u32) -> Self;
fn unbounded_shr(self, rhs: u32) -> Self;
fn cast_unsigned(self) -> Self::Uint;
fn to_le(self) -> Self;
fn to_be(self) -> Self;
fn to_ne_bytes(self) -> Self::Bytes;
fn to_le_bytes(self) -> Self::Bytes;
fn to_be_bytes(self) -> Self::Bytes;
}Expand description
A generic, signed integer.
This trait abstracts the interfaces defined by i8, i16, i32, i64, i128, and isize so that these may be used as a single type.
See also IntLeast16, IntLeast32, and IntLeast64.
§Safety
Uint must be the unsigned counterpart to Self so that transmutations between the two are always valid.
Furthermore, all items must behave exactly as their standard counterparts.
Required Associated Constants§
Required Associated Types§
Sourcetype Bytes: Array<Scalar = u8> + 'static + Any + CloneToUninit + ConstParamTy_ + Copy + Debug + Eq + Freeze + Hash + Ord + PartialEq + PartialEq<[u8]> + PartialOrd + RefUnwindSafe + Send + Sync + ToOwned + Unpin + UnwindSafe
type Bytes: Array<Scalar = u8> + 'static + Any + CloneToUninit + ConstParamTy_ + Copy + Debug + Eq + Freeze + Hash + Ord + PartialEq + PartialEq<[u8]> + PartialOrd + RefUnwindSafe + Send + Sync + ToOwned + Unpin + UnwindSafe
The array type that represents the bytes of this type.
Required Methods§
Sourcefn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
See i32::from_ne_bytes.
Sourcefn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
See i32::from_le_bytes.
Sourcefn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
See i32::from_be_bytes.
Sourcefn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>
fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>
See i32::from_str_radix.
Sourcefn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
Available on crate feature nightly_backports only.
fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
nightly_backports only.See i32::widening_mul.
Sourcefn div_euclid(self, rhs: Self) -> Self
fn div_euclid(self, rhs: Self) -> Self
See i32::div_euclid.
Sourcefn rem_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
See i32::rem_euclid.
Sourcefn exact_shl(self, rhs: u32) -> Option<Self>
Available on crate feature nightly_backports only.
fn exact_shl(self, rhs: u32) -> Option<Self>
nightly_backports only.Sourcefn exact_shr(self, rhs: u32) -> Option<Self>
Available on crate feature nightly_backports only.
fn exact_shr(self, rhs: u32) -> Option<Self>
nightly_backports only.Sourcefn rotate_left(self, rhs: u32) -> Self
fn rotate_left(self, rhs: u32) -> Self
See i32::rotate_left.
Sourcefn rotate_right(self, rhs: u32) -> Self
fn rotate_right(self, rhs: u32) -> Self
See i32::rotate_right.
Sourcefn swap_bytes(self) -> Self
fn swap_bytes(self) -> Self
See i32::swap_bytes.
Sourcefn reverse_bits(self) -> Self
fn reverse_bits(self) -> Self
See i32::reverse_bits.
Sourcefn unsigned_abs(self) -> Self::Uint
fn unsigned_abs(self) -> Self::Uint
See i32::unsigned_abs.
Sourcefn next_multiple_of(self, rhs: Self) -> Self
Available on crate feature nightly_backports only.
fn next_multiple_of(self, rhs: Self) -> Self
nightly_backports only.See i32::next_multiple_of.
Sourcefn isolate_lowest_one(self) -> Self
Available on crate feature nightly_backports only.
fn isolate_lowest_one(self) -> Self
nightly_backports only.See i32::isolate_lowest_one.
Sourcefn isolate_highest_one(self) -> Self
Available on crate feature nightly_backports only.
fn isolate_highest_one(self) -> Self
nightly_backports only.See i32::isolate_highest_one.
Sourcefn lowest_one(self) -> Option<u32>
Available on crate feature nightly_backports only.
fn lowest_one(self) -> Option<u32>
nightly_backports only.See i32::lowest_one.
Sourcefn highest_one(self) -> Option<u32>
Available on crate feature nightly_backports only.
fn highest_one(self) -> Option<u32>
nightly_backports only.See i32::highest_one.
Sourcefn count_zeros(self) -> u32
fn count_zeros(self) -> u32
See i32::count_zeros.
Sourcefn count_ones(self) -> u32
fn count_ones(self) -> u32
See i32::count_ones.
Sourcefn leading_zeros(self) -> u32
fn leading_zeros(self) -> u32
See i32::leading_zeros.
Sourcefn leading_ones(self) -> u32
fn leading_ones(self) -> u32
See i32::leading_ones.
Sourcefn trailing_zeros(self) -> u32
fn trailing_zeros(self) -> u32
See i32::trailing_zeros.
Sourcefn trailing_ones(self) -> u32
fn trailing_ones(self) -> u32
See i32::trailing_ones.
Sourcefn is_negative(self) -> bool
fn is_negative(self) -> bool
See i32::is_negative.
Sourcefn is_positive(self) -> bool
fn is_positive(self) -> bool
See i32::is_positive.
Sourcefn is_multiple_of(self, rhs: Self) -> bool
Available on crate feature nightly_backports only.
fn is_multiple_of(self, rhs: Self) -> bool
nightly_backports only.See i32::is_multiple_of.
Sourcefn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add(self, rhs: Self) -> Option<Self>
See i32::checked_add.
Sourcefn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>
fn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>
See i32::checked_add_unsigned.
Sourcefn checked_sub(self, rhs: Self) -> Option<Self>
fn checked_sub(self, rhs: Self) -> Option<Self>
See i32::checked_sub.
Sourcefn checked_sub_unsigned(self, rhs: Self::Uint) -> Option<Self>
fn checked_sub_unsigned(self, rhs: Self::Uint) -> Option<Self>
See i32::checked_sub_unsigned.
Sourcefn checked_mul(self, rhs: Self) -> Option<Self>
fn checked_mul(self, rhs: Self) -> Option<Self>
See i32::checked_mul.
Sourcefn checked_div(self, rhs: Self) -> Option<Self>
fn checked_div(self, rhs: Self) -> Option<Self>
See i32::checked_div.
Sourcefn checked_div_euclid(self, rhs: Self) -> Option<Self>
fn checked_div_euclid(self, rhs: Self) -> Option<Self>
See i32::checked_div_euclid.
Sourcefn checked_exact_div(self, rhs: Self) -> Option<Self>
Available on crate feature nightly_backports only.
fn checked_exact_div(self, rhs: Self) -> Option<Self>
nightly_backports only.See i32::checked_exact_div.
Sourcefn checked_rem(self, rhs: Self) -> Option<Self>
fn checked_rem(self, rhs: Self) -> Option<Self>
See i32::checked_rem.
Sourcefn checked_rem_euclid(self, rhs: Self) -> Option<Self>
fn checked_rem_euclid(self, rhs: Self) -> Option<Self>
See i32::checked_rem_euclid.
Sourcefn checked_shl(self, rhs: u32) -> Option<Self>
fn checked_shl(self, rhs: u32) -> Option<Self>
See i32::checked_shl.
Sourcefn checked_shr(self, rhs: u32) -> Option<Self>
fn checked_shr(self, rhs: u32) -> Option<Self>
See i32::checked_shr.
Sourcefn checked_neg(self) -> Option<Self>
fn checked_neg(self) -> Option<Self>
See i32::checked_neg.
Sourcefn checked_abs(self) -> Option<Self>
fn checked_abs(self) -> Option<Self>
See i32::checked_abs.
Sourcefn checked_pow(self, exp: u32) -> Option<Self>
fn checked_pow(self, exp: u32) -> Option<Self>
See i32::checked_pow.
Sourcefn checked_ilog(self, base: Self) -> Option<u32>
fn checked_ilog(self, base: Self) -> Option<u32>
See i32::checked_ilog.
Sourcefn checked_ilog2(self) -> Option<u32>
fn checked_ilog2(self) -> Option<u32>
See i32::checked_ilog2.
Sourcefn checked_ilog10(self) -> Option<u32>
fn checked_ilog10(self) -> Option<u32>
See i32::checked_ilog10.
Sourcefn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
Available on crate feature nightly_backports only.
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
nightly_backports only.See i32::checked_next_multiple_of.
Sourcefn strict_add(self, rhs: Self) -> Self
fn strict_add(self, rhs: Self) -> Self
See i32::strict_add.
Sourcefn strict_add_unsigned(self, rhs: Self::Uint) -> Self
fn strict_add_unsigned(self, rhs: Self::Uint) -> Self
See i32::strict_add_unsigned.
Sourcefn strict_sub(self, rhs: Self) -> Self
fn strict_sub(self, rhs: Self) -> Self
See i32::strict_sub.
Sourcefn strict_sub_unsigned(self, rhs: Self::Uint) -> Self
fn strict_sub_unsigned(self, rhs: Self::Uint) -> Self
See i32::strict_sub_unsigned.
Sourcefn strict_mul(self, rhs: Self) -> Self
fn strict_mul(self, rhs: Self) -> Self
See i32::strict_mul.
Sourcefn strict_div(self, rhs: Self) -> Self
fn strict_div(self, rhs: Self) -> Self
See i32::strict_div.
Sourcefn strict_div_euclid(self, rhs: Self) -> Self
fn strict_div_euclid(self, rhs: Self) -> Self
See i32::strict_div_euclid.
Sourcefn strict_rem(self, rhs: Self) -> Self
fn strict_rem(self, rhs: Self) -> Self
See i32::strict_rem.
Sourcefn strict_rem_euclid(self, rhs: Self) -> Self
fn strict_rem_euclid(self, rhs: Self) -> Self
See i32::strict_rem_euclid.
Sourcefn strict_shl(self, rhs: u32) -> Self
fn strict_shl(self, rhs: u32) -> Self
See i32::strict_shl.
Sourcefn strict_shr(self, rhs: u32) -> Self
fn strict_shr(self, rhs: u32) -> Self
See i32::strict_shr.
Sourcefn strict_neg(self) -> Self
fn strict_neg(self) -> Self
See i32::strict_neg.
Sourcefn strict_abs(self) -> Self
fn strict_abs(self) -> Self
See i32::strict_abs.
Sourcefn strict_pow(self, rhs: u32) -> Self
fn strict_pow(self, rhs: u32) -> Self
See i32::strict_pow.
Sourceunsafe fn unchecked_add(self, rhs: Self) -> Self
unsafe fn unchecked_add(self, rhs: Self) -> Self
See i32::unchecked_add.
Sourceunsafe fn unchecked_exact_div(self, rhs: Self) -> Self
Available on crate feature nightly_backports only.
unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
nightly_backports only.See i32::unchecked_exact_div.
Sourceunsafe fn unchecked_sub(self, rhs: Self) -> Self
unsafe fn unchecked_sub(self, rhs: Self) -> Self
See i32::unchecked_sub.
Sourceunsafe fn unchecked_mul(self, rhs: Self) -> Self
unsafe fn unchecked_mul(self, rhs: Self) -> Self
See i32::unchecked_mul.
Sourceunsafe fn unchecked_shl(self, rhs: u32) -> Self
Available on crate feature nightly_backports only.
unsafe fn unchecked_shl(self, rhs: u32) -> Self
nightly_backports only.See i32::unchecked_shl.
Sourceunsafe fn unchecked_shr(self, rhs: u32) -> Self
Available on crate feature nightly_backports only.
unsafe fn unchecked_shr(self, rhs: u32) -> Self
nightly_backports only.See i32::unchecked_shr.
Sourceunsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
Available on crate feature nightly_backports only.
unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
nightly_backports only.See i32::unchecked_exact_shl.
Sourceunsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
Available on crate feature nightly_backports only.
unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
nightly_backports only.See i32::unchecked_exact_shr.
Sourceunsafe fn unchecked_neg(self) -> Self
Available on crate feature nightly_backports only.
unsafe fn unchecked_neg(self) -> Self
nightly_backports only.See i32::unchecked_neg.
Sourcefn overflowing_add(self, rhs: Self) -> (Self, bool)
fn overflowing_add(self, rhs: Self) -> (Self, bool)
See i32::overflowing_add.
Sourcefn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool)
fn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool)
See i32::overflowing_add_unsigned.
Sourcefn overflowing_sub(self, rhs: Self) -> (Self, bool)
fn overflowing_sub(self, rhs: Self) -> (Self, bool)
See i32::overflowing_sub.
Sourcefn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (Self, bool)
fn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (Self, bool)
See i32::overflowing_sub_unsigned.
Sourcefn overflowing_mul(self, rhs: Self) -> (Self, bool)
fn overflowing_mul(self, rhs: Self) -> (Self, bool)
See i32::overflowing_mul.
Sourcefn overflowing_div(self, rhs: Self) -> (Self, bool)
fn overflowing_div(self, rhs: Self) -> (Self, bool)
See i32::overflowing_div.
Sourcefn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)
fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)
See i32::overflowing_div_euclid.
Sourcefn overflowing_rem(self, rhs: Self) -> (Self, bool)
fn overflowing_rem(self, rhs: Self) -> (Self, bool)
See i32::overflowing_rem.
Sourcefn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)
fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)
See i32::overflowing_rem_euclid.
Sourcefn overflowing_shl(self, rhs: u32) -> (Self, bool)
fn overflowing_shl(self, rhs: u32) -> (Self, bool)
See i32::overflowing_shl.
Sourcefn overflowing_shr(self, rhs: u32) -> (Self, bool)
fn overflowing_shr(self, rhs: u32) -> (Self, bool)
See i32::overflowing_shr.
Sourcefn overflowing_neg(self) -> (Self, bool)
fn overflowing_neg(self) -> (Self, bool)
See i32::overflowing_neg.
Sourcefn overflowing_abs(self) -> (Self, bool)
fn overflowing_abs(self) -> (Self, bool)
See i32::overflowing_abs.
Sourcefn overflowing_pow(self, exp: u32) -> (Self, bool)
fn overflowing_pow(self, exp: u32) -> (Self, bool)
See i32::overflowing_pow.
Sourcefn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
Available on crate feature nightly_backports only.
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
nightly_backports only.See i32::carrying_add.
Sourcefn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
Available on crate feature nightly_backports only.
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
nightly_backports only.See i32::carrying_mul.
Sourcefn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Uint, Self)
Available on crate feature nightly_backports only.
fn carrying_mul_add( self, mul: Self, add: Self, carry: Self, ) -> (Self::Uint, Self)
nightly_backports only.See i32::carrying_mul_add.
Sourcefn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
Available on crate feature nightly_backports only.
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
nightly_backports only.See i32::borrowing_sub.
Sourcefn wrapping_add(self, rhs: Self) -> Self
fn wrapping_add(self, rhs: Self) -> Self
See i32::wrapping_add.
Sourcefn wrapping_add_unsigned(self, rhs: Self::Uint) -> Self
fn wrapping_add_unsigned(self, rhs: Self::Uint) -> Self
See i32::wrapping_add_unsigned.
Sourcefn wrapping_sub(self, rhs: Self) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
See i32::wrapping_sub.
Sourcefn wrapping_sub_unsigned(self, rhs: Self::Uint) -> Self
fn wrapping_sub_unsigned(self, rhs: Self::Uint) -> Self
See i32::wrapping_sub_unsigned.
Sourcefn wrapping_mul(self, rhs: Self) -> Self
fn wrapping_mul(self, rhs: Self) -> Self
See i32::wrapping_mul.
Sourcefn wrapping_div(self, rhs: Self) -> Self
fn wrapping_div(self, rhs: Self) -> Self
See i32::wrapping_div.
Sourcefn wrapping_div_euclid(self, rhs: Self) -> Self
fn wrapping_div_euclid(self, rhs: Self) -> Self
See i32::wrapping_div_euclid.
Sourcefn wrapping_rem(self, rhs: Self) -> Self
fn wrapping_rem(self, rhs: Self) -> Self
See i32::wrapping_rem.
Sourcefn wrapping_rem_euclid(self, rhs: Self) -> Self
fn wrapping_rem_euclid(self, rhs: Self) -> Self
See i32::wrapping_rem_euclid.
Sourcefn wrapping_shl(self, rhs: u32) -> Self
fn wrapping_shl(self, rhs: u32) -> Self
See i32::wrapping_shl.
Sourcefn wrapping_shr(self, rhs: u32) -> Self
fn wrapping_shr(self, rhs: u32) -> Self
See i32::wrapping_shr.
Sourcefn wrapping_neg(self) -> Self
fn wrapping_neg(self) -> Self
See i32::wrapping_neg.
Sourcefn wrapping_abs(self) -> Self
fn wrapping_abs(self) -> Self
See i32::wrapping_abs.
Sourcefn wrapping_pow(self, exp: u32) -> Self
fn wrapping_pow(self, exp: u32) -> Self
See i32::wrapping_pow.
Sourcefn saturating_add(self, rhs: Self) -> Self
fn saturating_add(self, rhs: Self) -> Self
See i32::saturating_add.
Sourcefn saturating_add_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_add_unsigned(self, rhs: Self::Uint) -> Self
See i32::saturating_add_unsigned.
Sourcefn saturating_sub(self, rhs: Self) -> Self
fn saturating_sub(self, rhs: Self) -> Self
See i32::saturating_sub.
Sourcefn saturating_sub_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_sub_unsigned(self, rhs: Self::Uint) -> Self
See i32::saturating_sub_unsigned.
Sourcefn saturating_mul(self, rhs: Self) -> Self
fn saturating_mul(self, rhs: Self) -> Self
See i32::saturating_mul.
Sourcefn saturating_div(self, rhs: Self) -> Self
fn saturating_div(self, rhs: Self) -> Self
See i32::saturating_div.
Sourcefn saturating_neg(self) -> Self
fn saturating_neg(self) -> Self
See i32::saturating_neg.
Sourcefn saturating_abs(self) -> Self
fn saturating_abs(self) -> Self
See i32::saturating_abs.
Sourcefn saturating_pow(self, exp: u32) -> Self
fn saturating_pow(self, exp: u32) -> Self
See i32::saturating_pow.
Sourcefn unbounded_shl(self, rhs: u32) -> Self
fn unbounded_shl(self, rhs: u32) -> Self
See i32::unbounded_shl.
Sourcefn unbounded_shr(self, rhs: u32) -> Self
fn unbounded_shr(self, rhs: u32) -> Self
See i32::unbounded_shr.
Sourcefn cast_unsigned(self) -> Self::Uint
fn cast_unsigned(self) -> Self::Uint
Reinterprets self as an unsigned integer.
Sourcefn to_ne_bytes(self) -> Self::Bytes
fn to_ne_bytes(self) -> Self::Bytes
See i32::to_ne_bytes.
Sourcefn to_le_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
See i32::to_le_bytes.
Sourcefn to_be_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
See i32::to_be_bytes.
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 Int for i8
impl Int for i8
const BITS: u32 = 8u32
const MIN: Self = -128i8
const MAX: Self = 127i8
const ZERO: Self = 0i8
const ONE: Self = 1i8
type Uint = u8
type Bytes = [u8; 1]
fn from_le(value: Self) -> Self
fn from_be(value: Self) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>
Source§fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
nightly_backports only.fn div_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
Source§fn exact_shl(self, rhs: u32) -> Option<Self>
fn exact_shl(self, rhs: u32) -> Option<Self>
nightly_backports only.Source§fn exact_shr(self, rhs: u32) -> Option<Self>
fn exact_shr(self, rhs: u32) -> Option<Self>
nightly_backports only.fn rotate_left(self, rhs: u32) -> Self
fn rotate_right(self, rhs: u32) -> Self
fn swap_bytes(self) -> Self
fn reverse_bits(self) -> Self
fn abs(self) -> Self
fn unsigned_abs(self) -> Self::Uint
fn pow(self, exp: u32) -> Self
fn isqrt(self) -> Self
fn ilog(self, base: Self) -> u32
fn ilog2(self) -> u32
fn ilog10(self) -> u32
fn abs_diff(self, rhs: Self) -> Self::Uint
fn midpoint(self, rhs: Self) -> Self
Source§fn next_multiple_of(self, rhs: Self) -> Self
fn next_multiple_of(self, rhs: Self) -> Self
nightly_backports only.Source§fn isolate_lowest_one(self) -> Self
fn isolate_lowest_one(self) -> Self
nightly_backports only.Source§fn isolate_highest_one(self) -> Self
fn isolate_highest_one(self) -> Self
nightly_backports only.Source§fn lowest_one(self) -> Option<u32>
fn lowest_one(self) -> Option<u32>
nightly_backports only.Source§fn highest_one(self) -> Option<u32>
fn highest_one(self) -> Option<u32>
nightly_backports only.fn count_zeros(self) -> u32
fn count_ones(self) -> u32
fn leading_zeros(self) -> u32
fn leading_ones(self) -> u32
fn trailing_zeros(self) -> u32
fn trailing_ones(self) -> u32
fn signum(self) -> Self
fn is_negative(self) -> bool
fn is_positive(self) -> bool
Source§fn is_multiple_of(self, rhs: Self) -> bool
fn is_multiple_of(self, rhs: Self) -> bool
nightly_backports only.fn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>
fn checked_sub(self, rhs: Self) -> Option<Self>
fn checked_sub_unsigned(self, rhs: Self::Uint) -> 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>
Source§fn checked_exact_div(self, rhs: Self) -> Option<Self>
fn checked_exact_div(self, rhs: Self) -> Option<Self>
nightly_backports only.fn checked_rem(self, rhs: Self) -> Option<Self>
fn checked_rem_euclid(self, rhs: Self) -> Option<Self>
fn checked_shl(self, rhs: u32) -> Option<Self>
fn checked_shr(self, rhs: u32) -> Option<Self>
fn checked_neg(self) -> Option<Self>
fn checked_abs(self) -> Option<Self>
fn checked_pow(self, exp: u32) -> Option<Self>
fn checked_ilog(self, base: Self) -> Option<u32>
fn checked_ilog2(self) -> Option<u32>
fn checked_ilog10(self) -> Option<u32>
Source§fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
nightly_backports only.fn strict_add(self, rhs: Self) -> Self
fn strict_add_unsigned(self, rhs: Self::Uint) -> Self
fn strict_sub(self, rhs: Self) -> Self
fn strict_sub_unsigned(self, rhs: Self::Uint) -> Self
fn strict_mul(self, rhs: Self) -> Self
fn strict_div(self, rhs: Self) -> Self
fn strict_div_euclid(self, rhs: Self) -> Self
fn strict_rem(self, rhs: Self) -> Self
fn strict_rem_euclid(self, rhs: Self) -> Self
fn strict_shl(self, rhs: u32) -> Self
fn strict_shr(self, rhs: u32) -> Self
fn strict_neg(self) -> Self
fn strict_abs(self) -> Self
fn strict_pow(self, exp: u32) -> Self
unsafe fn unchecked_add(self, rhs: Self) -> Self
Source§unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
nightly_backports only.unsafe fn unchecked_sub(self, rhs: Self) -> Self
unsafe fn unchecked_mul(self, rhs: Self) -> Self
Source§unsafe fn unchecked_shl(self, rhs: u32) -> Self
unsafe fn unchecked_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_shr(self, rhs: u32) -> Self
unsafe fn unchecked_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_neg(self) -> Self
unsafe fn unchecked_neg(self) -> Self
nightly_backports only.fn overflowing_add(self, rhs: Self) -> (Self, bool)
fn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool)
fn overflowing_sub(self, rhs: Self) -> (Self, bool)
fn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (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_shl(self, rhs: u32) -> (Self, bool)
fn overflowing_shr(self, rhs: u32) -> (Self, bool)
fn overflowing_neg(self) -> (Self, bool)
fn overflowing_abs(self) -> (Self, bool)
fn overflowing_pow(self, exp: u32) -> (Self, bool)
Source§fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
nightly_backports only.Source§fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
nightly_backports only.Source§fn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Uint, Self)
fn carrying_mul_add( self, mul: Self, add: Self, carry: Self, ) -> (Self::Uint, Self)
nightly_backports only.Source§fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
nightly_backports only.fn wrapping_add(self, rhs: Self) -> Self
fn wrapping_add_unsigned(self, rhs: Self::Uint) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
fn wrapping_sub_unsigned(self, rhs: Self::Uint) -> 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_shl(self, rhs: u32) -> Self
fn wrapping_shr(self, rhs: u32) -> Self
fn wrapping_neg(self) -> Self
fn wrapping_abs(self) -> Self
fn wrapping_pow(self, exp: u32) -> Self
fn saturating_add(self, rhs: Self) -> Self
fn saturating_add_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_sub(self, rhs: Self) -> Self
fn saturating_sub_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_mul(self, rhs: Self) -> Self
fn saturating_div(self, rhs: Self) -> Self
fn saturating_neg(self) -> Self
fn saturating_abs(self) -> Self
fn saturating_pow(self, exp: u32) -> Self
fn unbounded_shl(self, rhs: u32) -> Self
fn unbounded_shr(self, rhs: u32) -> Self
fn cast_unsigned(self) -> Self::Uint
fn to_le(self) -> Self
fn to_be(self) -> Self
fn to_ne_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
Source§impl Int for i16
impl Int for i16
const BITS: u32 = 16u32
const MIN: Self = -32_768i16
const MAX: Self = 32_767i16
const ZERO: Self = 0i16
const ONE: Self = 1i16
type Uint = u16
type Bytes = [u8; 2]
fn from_le(value: Self) -> Self
fn from_be(value: Self) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>
Source§fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
nightly_backports only.fn div_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
Source§fn exact_shl(self, rhs: u32) -> Option<Self>
fn exact_shl(self, rhs: u32) -> Option<Self>
nightly_backports only.Source§fn exact_shr(self, rhs: u32) -> Option<Self>
fn exact_shr(self, rhs: u32) -> Option<Self>
nightly_backports only.fn rotate_left(self, rhs: u32) -> Self
fn rotate_right(self, rhs: u32) -> Self
fn swap_bytes(self) -> Self
fn reverse_bits(self) -> Self
fn abs(self) -> Self
fn unsigned_abs(self) -> Self::Uint
fn pow(self, exp: u32) -> Self
fn isqrt(self) -> Self
fn ilog(self, base: Self) -> u32
fn ilog2(self) -> u32
fn ilog10(self) -> u32
fn abs_diff(self, rhs: Self) -> Self::Uint
fn midpoint(self, rhs: Self) -> Self
Source§fn next_multiple_of(self, rhs: Self) -> Self
fn next_multiple_of(self, rhs: Self) -> Self
nightly_backports only.Source§fn isolate_lowest_one(self) -> Self
fn isolate_lowest_one(self) -> Self
nightly_backports only.Source§fn isolate_highest_one(self) -> Self
fn isolate_highest_one(self) -> Self
nightly_backports only.Source§fn lowest_one(self) -> Option<u32>
fn lowest_one(self) -> Option<u32>
nightly_backports only.Source§fn highest_one(self) -> Option<u32>
fn highest_one(self) -> Option<u32>
nightly_backports only.fn count_zeros(self) -> u32
fn count_ones(self) -> u32
fn leading_zeros(self) -> u32
fn leading_ones(self) -> u32
fn trailing_zeros(self) -> u32
fn trailing_ones(self) -> u32
fn signum(self) -> Self
fn is_negative(self) -> bool
fn is_positive(self) -> bool
Source§fn is_multiple_of(self, rhs: Self) -> bool
fn is_multiple_of(self, rhs: Self) -> bool
nightly_backports only.fn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>
fn checked_sub(self, rhs: Self) -> Option<Self>
fn checked_sub_unsigned(self, rhs: Self::Uint) -> 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>
Source§fn checked_exact_div(self, rhs: Self) -> Option<Self>
fn checked_exact_div(self, rhs: Self) -> Option<Self>
nightly_backports only.fn checked_rem(self, rhs: Self) -> Option<Self>
fn checked_rem_euclid(self, rhs: Self) -> Option<Self>
fn checked_shl(self, rhs: u32) -> Option<Self>
fn checked_shr(self, rhs: u32) -> Option<Self>
fn checked_neg(self) -> Option<Self>
fn checked_abs(self) -> Option<Self>
fn checked_pow(self, exp: u32) -> Option<Self>
fn checked_ilog(self, base: Self) -> Option<u32>
fn checked_ilog2(self) -> Option<u32>
fn checked_ilog10(self) -> Option<u32>
Source§fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
nightly_backports only.fn strict_add(self, rhs: Self) -> Self
fn strict_add_unsigned(self, rhs: Self::Uint) -> Self
fn strict_sub(self, rhs: Self) -> Self
fn strict_sub_unsigned(self, rhs: Self::Uint) -> Self
fn strict_mul(self, rhs: Self) -> Self
fn strict_div(self, rhs: Self) -> Self
fn strict_div_euclid(self, rhs: Self) -> Self
fn strict_rem(self, rhs: Self) -> Self
fn strict_rem_euclid(self, rhs: Self) -> Self
fn strict_shl(self, rhs: u32) -> Self
fn strict_shr(self, rhs: u32) -> Self
fn strict_neg(self) -> Self
fn strict_abs(self) -> Self
fn strict_pow(self, exp: u32) -> Self
unsafe fn unchecked_add(self, rhs: Self) -> Self
Source§unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
nightly_backports only.unsafe fn unchecked_sub(self, rhs: Self) -> Self
unsafe fn unchecked_mul(self, rhs: Self) -> Self
Source§unsafe fn unchecked_shl(self, rhs: u32) -> Self
unsafe fn unchecked_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_shr(self, rhs: u32) -> Self
unsafe fn unchecked_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_neg(self) -> Self
unsafe fn unchecked_neg(self) -> Self
nightly_backports only.fn overflowing_add(self, rhs: Self) -> (Self, bool)
fn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool)
fn overflowing_sub(self, rhs: Self) -> (Self, bool)
fn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (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_shl(self, rhs: u32) -> (Self, bool)
fn overflowing_shr(self, rhs: u32) -> (Self, bool)
fn overflowing_neg(self) -> (Self, bool)
fn overflowing_abs(self) -> (Self, bool)
fn overflowing_pow(self, exp: u32) -> (Self, bool)
Source§fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
nightly_backports only.Source§fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
nightly_backports only.Source§fn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Uint, Self)
fn carrying_mul_add( self, mul: Self, add: Self, carry: Self, ) -> (Self::Uint, Self)
nightly_backports only.Source§fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
nightly_backports only.fn wrapping_add(self, rhs: Self) -> Self
fn wrapping_add_unsigned(self, rhs: Self::Uint) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
fn wrapping_sub_unsigned(self, rhs: Self::Uint) -> 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_shl(self, rhs: u32) -> Self
fn wrapping_shr(self, rhs: u32) -> Self
fn wrapping_neg(self) -> Self
fn wrapping_abs(self) -> Self
fn wrapping_pow(self, exp: u32) -> Self
fn saturating_add(self, rhs: Self) -> Self
fn saturating_add_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_sub(self, rhs: Self) -> Self
fn saturating_sub_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_mul(self, rhs: Self) -> Self
fn saturating_div(self, rhs: Self) -> Self
fn saturating_neg(self) -> Self
fn saturating_abs(self) -> Self
fn saturating_pow(self, exp: u32) -> Self
fn unbounded_shl(self, rhs: u32) -> Self
fn unbounded_shr(self, rhs: u32) -> Self
fn cast_unsigned(self) -> Self::Uint
fn to_le(self) -> Self
fn to_be(self) -> Self
fn to_ne_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
Source§impl Int for i32
impl Int for i32
const BITS: u32 = 32u32
const MIN: Self = -2_147_483_648i32
const MAX: Self = 2_147_483_647i32
const ZERO: Self = 0i32
const ONE: Self = 1i32
type Uint = u32
type Bytes = [u8; 4]
fn from_le(value: Self) -> Self
fn from_be(value: Self) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>
Source§fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
nightly_backports only.fn div_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
Source§fn exact_shl(self, rhs: u32) -> Option<Self>
fn exact_shl(self, rhs: u32) -> Option<Self>
nightly_backports only.Source§fn exact_shr(self, rhs: u32) -> Option<Self>
fn exact_shr(self, rhs: u32) -> Option<Self>
nightly_backports only.fn rotate_left(self, rhs: u32) -> Self
fn rotate_right(self, rhs: u32) -> Self
fn swap_bytes(self) -> Self
fn reverse_bits(self) -> Self
fn abs(self) -> Self
fn unsigned_abs(self) -> Self::Uint
fn pow(self, exp: u32) -> Self
fn isqrt(self) -> Self
fn ilog(self, base: Self) -> u32
fn ilog2(self) -> u32
fn ilog10(self) -> u32
fn abs_diff(self, rhs: Self) -> Self::Uint
fn midpoint(self, rhs: Self) -> Self
Source§fn next_multiple_of(self, rhs: Self) -> Self
fn next_multiple_of(self, rhs: Self) -> Self
nightly_backports only.Source§fn isolate_lowest_one(self) -> Self
fn isolate_lowest_one(self) -> Self
nightly_backports only.Source§fn isolate_highest_one(self) -> Self
fn isolate_highest_one(self) -> Self
nightly_backports only.Source§fn lowest_one(self) -> Option<u32>
fn lowest_one(self) -> Option<u32>
nightly_backports only.Source§fn highest_one(self) -> Option<u32>
fn highest_one(self) -> Option<u32>
nightly_backports only.fn count_zeros(self) -> u32
fn count_ones(self) -> u32
fn leading_zeros(self) -> u32
fn leading_ones(self) -> u32
fn trailing_zeros(self) -> u32
fn trailing_ones(self) -> u32
fn signum(self) -> Self
fn is_negative(self) -> bool
fn is_positive(self) -> bool
Source§fn is_multiple_of(self, rhs: Self) -> bool
fn is_multiple_of(self, rhs: Self) -> bool
nightly_backports only.fn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>
fn checked_sub(self, rhs: Self) -> Option<Self>
fn checked_sub_unsigned(self, rhs: Self::Uint) -> 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>
Source§fn checked_exact_div(self, rhs: Self) -> Option<Self>
fn checked_exact_div(self, rhs: Self) -> Option<Self>
nightly_backports only.fn checked_rem(self, rhs: Self) -> Option<Self>
fn checked_rem_euclid(self, rhs: Self) -> Option<Self>
fn checked_shl(self, rhs: u32) -> Option<Self>
fn checked_shr(self, rhs: u32) -> Option<Self>
fn checked_neg(self) -> Option<Self>
fn checked_abs(self) -> Option<Self>
fn checked_pow(self, exp: u32) -> Option<Self>
fn checked_ilog(self, base: Self) -> Option<u32>
fn checked_ilog2(self) -> Option<u32>
fn checked_ilog10(self) -> Option<u32>
Source§fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
nightly_backports only.fn strict_add(self, rhs: Self) -> Self
fn strict_add_unsigned(self, rhs: Self::Uint) -> Self
fn strict_sub(self, rhs: Self) -> Self
fn strict_sub_unsigned(self, rhs: Self::Uint) -> Self
fn strict_mul(self, rhs: Self) -> Self
fn strict_div(self, rhs: Self) -> Self
fn strict_div_euclid(self, rhs: Self) -> Self
fn strict_rem(self, rhs: Self) -> Self
fn strict_rem_euclid(self, rhs: Self) -> Self
fn strict_shl(self, rhs: u32) -> Self
fn strict_shr(self, rhs: u32) -> Self
fn strict_neg(self) -> Self
fn strict_abs(self) -> Self
fn strict_pow(self, exp: u32) -> Self
unsafe fn unchecked_add(self, rhs: Self) -> Self
Source§unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
nightly_backports only.unsafe fn unchecked_sub(self, rhs: Self) -> Self
unsafe fn unchecked_mul(self, rhs: Self) -> Self
Source§unsafe fn unchecked_shl(self, rhs: u32) -> Self
unsafe fn unchecked_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_shr(self, rhs: u32) -> Self
unsafe fn unchecked_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_neg(self) -> Self
unsafe fn unchecked_neg(self) -> Self
nightly_backports only.fn overflowing_add(self, rhs: Self) -> (Self, bool)
fn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool)
fn overflowing_sub(self, rhs: Self) -> (Self, bool)
fn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (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_shl(self, rhs: u32) -> (Self, bool)
fn overflowing_shr(self, rhs: u32) -> (Self, bool)
fn overflowing_neg(self) -> (Self, bool)
fn overflowing_abs(self) -> (Self, bool)
fn overflowing_pow(self, exp: u32) -> (Self, bool)
Source§fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
nightly_backports only.Source§fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
nightly_backports only.Source§fn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Uint, Self)
fn carrying_mul_add( self, mul: Self, add: Self, carry: Self, ) -> (Self::Uint, Self)
nightly_backports only.Source§fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
nightly_backports only.fn wrapping_add(self, rhs: Self) -> Self
fn wrapping_add_unsigned(self, rhs: Self::Uint) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
fn wrapping_sub_unsigned(self, rhs: Self::Uint) -> 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_shl(self, rhs: u32) -> Self
fn wrapping_shr(self, rhs: u32) -> Self
fn wrapping_neg(self) -> Self
fn wrapping_abs(self) -> Self
fn wrapping_pow(self, exp: u32) -> Self
fn saturating_add(self, rhs: Self) -> Self
fn saturating_add_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_sub(self, rhs: Self) -> Self
fn saturating_sub_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_mul(self, rhs: Self) -> Self
fn saturating_div(self, rhs: Self) -> Self
fn saturating_neg(self) -> Self
fn saturating_abs(self) -> Self
fn saturating_pow(self, exp: u32) -> Self
fn unbounded_shl(self, rhs: u32) -> Self
fn unbounded_shr(self, rhs: u32) -> Self
fn cast_unsigned(self) -> Self::Uint
fn to_le(self) -> Self
fn to_be(self) -> Self
fn to_ne_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
Source§impl Int for i64
impl Int for i64
const BITS: u32 = 64u32
const MIN: Self = -9_223_372_036_854_775_808i64
const MAX: Self = 9_223_372_036_854_775_807i64
const ZERO: Self = 0i64
const ONE: Self = 1i64
type Uint = u64
type Bytes = [u8; 8]
fn from_le(value: Self) -> Self
fn from_be(value: Self) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>
Source§fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
nightly_backports only.fn div_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
Source§fn exact_shl(self, rhs: u32) -> Option<Self>
fn exact_shl(self, rhs: u32) -> Option<Self>
nightly_backports only.Source§fn exact_shr(self, rhs: u32) -> Option<Self>
fn exact_shr(self, rhs: u32) -> Option<Self>
nightly_backports only.fn rotate_left(self, rhs: u32) -> Self
fn rotate_right(self, rhs: u32) -> Self
fn swap_bytes(self) -> Self
fn reverse_bits(self) -> Self
fn abs(self) -> Self
fn unsigned_abs(self) -> Self::Uint
fn pow(self, exp: u32) -> Self
fn isqrt(self) -> Self
fn ilog(self, base: Self) -> u32
fn ilog2(self) -> u32
fn ilog10(self) -> u32
fn abs_diff(self, rhs: Self) -> Self::Uint
fn midpoint(self, rhs: Self) -> Self
Source§fn next_multiple_of(self, rhs: Self) -> Self
fn next_multiple_of(self, rhs: Self) -> Self
nightly_backports only.Source§fn isolate_lowest_one(self) -> Self
fn isolate_lowest_one(self) -> Self
nightly_backports only.Source§fn isolate_highest_one(self) -> Self
fn isolate_highest_one(self) -> Self
nightly_backports only.Source§fn lowest_one(self) -> Option<u32>
fn lowest_one(self) -> Option<u32>
nightly_backports only.Source§fn highest_one(self) -> Option<u32>
fn highest_one(self) -> Option<u32>
nightly_backports only.fn count_zeros(self) -> u32
fn count_ones(self) -> u32
fn leading_zeros(self) -> u32
fn leading_ones(self) -> u32
fn trailing_zeros(self) -> u32
fn trailing_ones(self) -> u32
fn signum(self) -> Self
fn is_negative(self) -> bool
fn is_positive(self) -> bool
Source§fn is_multiple_of(self, rhs: Self) -> bool
fn is_multiple_of(self, rhs: Self) -> bool
nightly_backports only.fn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>
fn checked_sub(self, rhs: Self) -> Option<Self>
fn checked_sub_unsigned(self, rhs: Self::Uint) -> 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>
Source§fn checked_exact_div(self, rhs: Self) -> Option<Self>
fn checked_exact_div(self, rhs: Self) -> Option<Self>
nightly_backports only.fn checked_rem(self, rhs: Self) -> Option<Self>
fn checked_rem_euclid(self, rhs: Self) -> Option<Self>
fn checked_shl(self, rhs: u32) -> Option<Self>
fn checked_shr(self, rhs: u32) -> Option<Self>
fn checked_neg(self) -> Option<Self>
fn checked_abs(self) -> Option<Self>
fn checked_pow(self, exp: u32) -> Option<Self>
fn checked_ilog(self, base: Self) -> Option<u32>
fn checked_ilog2(self) -> Option<u32>
fn checked_ilog10(self) -> Option<u32>
Source§fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
nightly_backports only.fn strict_add(self, rhs: Self) -> Self
fn strict_add_unsigned(self, rhs: Self::Uint) -> Self
fn strict_sub(self, rhs: Self) -> Self
fn strict_sub_unsigned(self, rhs: Self::Uint) -> Self
fn strict_mul(self, rhs: Self) -> Self
fn strict_div(self, rhs: Self) -> Self
fn strict_div_euclid(self, rhs: Self) -> Self
fn strict_rem(self, rhs: Self) -> Self
fn strict_rem_euclid(self, rhs: Self) -> Self
fn strict_shl(self, rhs: u32) -> Self
fn strict_shr(self, rhs: u32) -> Self
fn strict_neg(self) -> Self
fn strict_abs(self) -> Self
fn strict_pow(self, exp: u32) -> Self
unsafe fn unchecked_add(self, rhs: Self) -> Self
Source§unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
nightly_backports only.unsafe fn unchecked_sub(self, rhs: Self) -> Self
unsafe fn unchecked_mul(self, rhs: Self) -> Self
Source§unsafe fn unchecked_shl(self, rhs: u32) -> Self
unsafe fn unchecked_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_shr(self, rhs: u32) -> Self
unsafe fn unchecked_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_neg(self) -> Self
unsafe fn unchecked_neg(self) -> Self
nightly_backports only.fn overflowing_add(self, rhs: Self) -> (Self, bool)
fn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool)
fn overflowing_sub(self, rhs: Self) -> (Self, bool)
fn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (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_shl(self, rhs: u32) -> (Self, bool)
fn overflowing_shr(self, rhs: u32) -> (Self, bool)
fn overflowing_neg(self) -> (Self, bool)
fn overflowing_abs(self) -> (Self, bool)
fn overflowing_pow(self, exp: u32) -> (Self, bool)
Source§fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
nightly_backports only.Source§fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
nightly_backports only.Source§fn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Uint, Self)
fn carrying_mul_add( self, mul: Self, add: Self, carry: Self, ) -> (Self::Uint, Self)
nightly_backports only.Source§fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
nightly_backports only.fn wrapping_add(self, rhs: Self) -> Self
fn wrapping_add_unsigned(self, rhs: Self::Uint) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
fn wrapping_sub_unsigned(self, rhs: Self::Uint) -> 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_shl(self, rhs: u32) -> Self
fn wrapping_shr(self, rhs: u32) -> Self
fn wrapping_neg(self) -> Self
fn wrapping_abs(self) -> Self
fn wrapping_pow(self, exp: u32) -> Self
fn saturating_add(self, rhs: Self) -> Self
fn saturating_add_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_sub(self, rhs: Self) -> Self
fn saturating_sub_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_mul(self, rhs: Self) -> Self
fn saturating_div(self, rhs: Self) -> Self
fn saturating_neg(self) -> Self
fn saturating_abs(self) -> Self
fn saturating_pow(self, exp: u32) -> Self
fn unbounded_shl(self, rhs: u32) -> Self
fn unbounded_shr(self, rhs: u32) -> Self
fn cast_unsigned(self) -> Self::Uint
fn to_le(self) -> Self
fn to_be(self) -> Self
fn to_ne_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
Source§impl Int for i128
impl Int for i128
const BITS: u32 = 128u32
const MIN: Self = -170_141_183_460_469_231_731_687_303_715_884_105_728i128
const MAX: Self = 170_141_183_460_469_231_731_687_303_715_884_105_727i128
const ZERO: Self = 0i128
const ONE: Self = 1i128
type Uint = u128
type Bytes = [u8; 16]
fn from_le(value: Self) -> Self
fn from_be(value: Self) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>
Source§fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
nightly_backports only.fn div_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
Source§fn exact_shl(self, rhs: u32) -> Option<Self>
fn exact_shl(self, rhs: u32) -> Option<Self>
nightly_backports only.Source§fn exact_shr(self, rhs: u32) -> Option<Self>
fn exact_shr(self, rhs: u32) -> Option<Self>
nightly_backports only.fn rotate_left(self, rhs: u32) -> Self
fn rotate_right(self, rhs: u32) -> Self
fn swap_bytes(self) -> Self
fn reverse_bits(self) -> Self
fn abs(self) -> Self
fn unsigned_abs(self) -> Self::Uint
fn pow(self, exp: u32) -> Self
fn isqrt(self) -> Self
fn ilog(self, base: Self) -> u32
fn ilog2(self) -> u32
fn ilog10(self) -> u32
fn abs_diff(self, rhs: Self) -> Self::Uint
fn midpoint(self, rhs: Self) -> Self
Source§fn next_multiple_of(self, rhs: Self) -> Self
fn next_multiple_of(self, rhs: Self) -> Self
nightly_backports only.Source§fn isolate_lowest_one(self) -> Self
fn isolate_lowest_one(self) -> Self
nightly_backports only.Source§fn isolate_highest_one(self) -> Self
fn isolate_highest_one(self) -> Self
nightly_backports only.Source§fn lowest_one(self) -> Option<u32>
fn lowest_one(self) -> Option<u32>
nightly_backports only.Source§fn highest_one(self) -> Option<u32>
fn highest_one(self) -> Option<u32>
nightly_backports only.fn count_zeros(self) -> u32
fn count_ones(self) -> u32
fn leading_zeros(self) -> u32
fn leading_ones(self) -> u32
fn trailing_zeros(self) -> u32
fn trailing_ones(self) -> u32
fn signum(self) -> Self
fn is_negative(self) -> bool
fn is_positive(self) -> bool
Source§fn is_multiple_of(self, rhs: Self) -> bool
fn is_multiple_of(self, rhs: Self) -> bool
nightly_backports only.fn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>
fn checked_sub(self, rhs: Self) -> Option<Self>
fn checked_sub_unsigned(self, rhs: Self::Uint) -> 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>
Source§fn checked_exact_div(self, rhs: Self) -> Option<Self>
fn checked_exact_div(self, rhs: Self) -> Option<Self>
nightly_backports only.fn checked_rem(self, rhs: Self) -> Option<Self>
fn checked_rem_euclid(self, rhs: Self) -> Option<Self>
fn checked_shl(self, rhs: u32) -> Option<Self>
fn checked_shr(self, rhs: u32) -> Option<Self>
fn checked_neg(self) -> Option<Self>
fn checked_abs(self) -> Option<Self>
fn checked_pow(self, exp: u32) -> Option<Self>
fn checked_ilog(self, base: Self) -> Option<u32>
fn checked_ilog2(self) -> Option<u32>
fn checked_ilog10(self) -> Option<u32>
Source§fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
nightly_backports only.fn strict_add(self, rhs: Self) -> Self
fn strict_add_unsigned(self, rhs: Self::Uint) -> Self
fn strict_sub(self, rhs: Self) -> Self
fn strict_sub_unsigned(self, rhs: Self::Uint) -> Self
fn strict_mul(self, rhs: Self) -> Self
fn strict_div(self, rhs: Self) -> Self
fn strict_div_euclid(self, rhs: Self) -> Self
fn strict_rem(self, rhs: Self) -> Self
fn strict_rem_euclid(self, rhs: Self) -> Self
fn strict_shl(self, rhs: u32) -> Self
fn strict_shr(self, rhs: u32) -> Self
fn strict_neg(self) -> Self
fn strict_abs(self) -> Self
fn strict_pow(self, exp: u32) -> Self
unsafe fn unchecked_add(self, rhs: Self) -> Self
Source§unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
nightly_backports only.unsafe fn unchecked_sub(self, rhs: Self) -> Self
unsafe fn unchecked_mul(self, rhs: Self) -> Self
Source§unsafe fn unchecked_shl(self, rhs: u32) -> Self
unsafe fn unchecked_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_shr(self, rhs: u32) -> Self
unsafe fn unchecked_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_neg(self) -> Self
unsafe fn unchecked_neg(self) -> Self
nightly_backports only.fn overflowing_add(self, rhs: Self) -> (Self, bool)
fn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool)
fn overflowing_sub(self, rhs: Self) -> (Self, bool)
fn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (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_shl(self, rhs: u32) -> (Self, bool)
fn overflowing_shr(self, rhs: u32) -> (Self, bool)
fn overflowing_neg(self) -> (Self, bool)
fn overflowing_abs(self) -> (Self, bool)
fn overflowing_pow(self, exp: u32) -> (Self, bool)
Source§fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
nightly_backports only.Source§fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
nightly_backports only.Source§fn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Uint, Self)
fn carrying_mul_add( self, mul: Self, add: Self, carry: Self, ) -> (Self::Uint, Self)
nightly_backports only.Source§fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
nightly_backports only.fn wrapping_add(self, rhs: Self) -> Self
fn wrapping_add_unsigned(self, rhs: Self::Uint) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
fn wrapping_sub_unsigned(self, rhs: Self::Uint) -> 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_shl(self, rhs: u32) -> Self
fn wrapping_shr(self, rhs: u32) -> Self
fn wrapping_neg(self) -> Self
fn wrapping_abs(self) -> Self
fn wrapping_pow(self, exp: u32) -> Self
fn saturating_add(self, rhs: Self) -> Self
fn saturating_add_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_sub(self, rhs: Self) -> Self
fn saturating_sub_unsigned(self, rhs: Self::Uint) -> Self
fn saturating_mul(self, rhs: Self) -> Self
fn saturating_div(self, rhs: Self) -> Self
fn saturating_neg(self) -> Self
fn saturating_abs(self) -> Self
fn saturating_pow(self, exp: u32) -> Self
fn unbounded_shl(self, rhs: u32) -> Self
fn unbounded_shr(self, rhs: u32) -> Self
fn cast_unsigned(self) -> Self::Uint
fn to_le(self) -> Self
fn to_be(self) -> Self
fn to_ne_bytes(self) -> Self::Bytes
fn to_le_bytes(self) -> Self::Bytes
fn to_be_bytes(self) -> Self::Bytes
Source§impl Int for isize
impl Int for isize
const BITS: u32 = 32u32
const MIN: Self = -2_147_483_648isize
const MAX: Self = 2_147_483_647isize
const ZERO: Self = 0isize
const ONE: Self = 1isize
type Uint = usize
type Bytes = [u8; 4]
fn from_le(value: Self) -> Self
fn from_be(value: Self) -> Self
fn from_ne_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseIntError>
Source§fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
fn widening_mul(self, rhs: Self) -> (Self::Uint, Self)
nightly_backports only.fn div_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
Source§fn exact_shl(self, rhs: u32) -> Option<Self>
fn exact_shl(self, rhs: u32) -> Option<Self>
nightly_backports only.Source§fn exact_shr(self, rhs: u32) -> Option<Self>
fn exact_shr(self, rhs: u32) -> Option<Self>
nightly_backports only.fn rotate_left(self, rhs: u32) -> Self
fn rotate_right(self, rhs: u32) -> Self
fn swap_bytes(self) -> Self
fn reverse_bits(self) -> Self
fn abs(self) -> Self
fn unsigned_abs(self) -> Self::Uint
fn pow(self, exp: u32) -> Self
fn isqrt(self) -> Self
fn ilog(self, base: Self) -> u32
fn ilog2(self) -> u32
fn ilog10(self) -> u32
fn abs_diff(self, rhs: Self) -> Self::Uint
fn midpoint(self, rhs: Self) -> Self
Source§fn next_multiple_of(self, rhs: Self) -> Self
fn next_multiple_of(self, rhs: Self) -> Self
nightly_backports only.Source§fn isolate_lowest_one(self) -> Self
fn isolate_lowest_one(self) -> Self
nightly_backports only.Source§fn isolate_highest_one(self) -> Self
fn isolate_highest_one(self) -> Self
nightly_backports only.Source§fn lowest_one(self) -> Option<u32>
fn lowest_one(self) -> Option<u32>
nightly_backports only.Source§fn highest_one(self) -> Option<u32>
fn highest_one(self) -> Option<u32>
nightly_backports only.fn count_zeros(self) -> u32
fn count_ones(self) -> u32
fn leading_zeros(self) -> u32
fn leading_ones(self) -> u32
fn trailing_zeros(self) -> u32
fn trailing_ones(self) -> u32
fn signum(self) -> Self
fn is_negative(self) -> bool
fn is_positive(self) -> bool
Source§fn is_multiple_of(self, rhs: Self) -> bool
fn is_multiple_of(self, rhs: Self) -> bool
nightly_backports only.fn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add_unsigned(self, rhs: Self::Uint) -> Option<Self>
fn checked_sub(self, rhs: Self) -> Option<Self>
fn checked_sub_unsigned(self, rhs: Self::Uint) -> 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>
Source§fn checked_exact_div(self, rhs: Self) -> Option<Self>
fn checked_exact_div(self, rhs: Self) -> Option<Self>
nightly_backports only.fn checked_rem(self, rhs: Self) -> Option<Self>
fn checked_rem_euclid(self, rhs: Self) -> Option<Self>
fn checked_shl(self, rhs: u32) -> Option<Self>
fn checked_shr(self, rhs: u32) -> Option<Self>
fn checked_neg(self) -> Option<Self>
fn checked_abs(self) -> Option<Self>
fn checked_pow(self, exp: u32) -> Option<Self>
fn checked_ilog(self, base: Self) -> Option<u32>
fn checked_ilog2(self) -> Option<u32>
fn checked_ilog10(self) -> Option<u32>
Source§fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
nightly_backports only.fn strict_add(self, rhs: Self) -> Self
fn strict_add_unsigned(self, rhs: Self::Uint) -> Self
fn strict_sub(self, rhs: Self) -> Self
fn strict_sub_unsigned(self, rhs: Self::Uint) -> Self
fn strict_mul(self, rhs: Self) -> Self
fn strict_div(self, rhs: Self) -> Self
fn strict_div_euclid(self, rhs: Self) -> Self
fn strict_rem(self, rhs: Self) -> Self
fn strict_rem_euclid(self, rhs: Self) -> Self
fn strict_shl(self, rhs: u32) -> Self
fn strict_shr(self, rhs: u32) -> Self
fn strict_neg(self) -> Self
fn strict_abs(self) -> Self
fn strict_pow(self, exp: u32) -> Self
unsafe fn unchecked_add(self, rhs: Self) -> Self
Source§unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
unsafe fn unchecked_exact_div(self, rhs: Self) -> Self
nightly_backports only.unsafe fn unchecked_sub(self, rhs: Self) -> Self
unsafe fn unchecked_mul(self, rhs: Self) -> Self
Source§unsafe fn unchecked_shl(self, rhs: u32) -> Self
unsafe fn unchecked_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_shr(self, rhs: u32) -> Self
unsafe fn unchecked_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shl(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
unsafe fn unchecked_exact_shr(self, rhs: u32) -> Self
nightly_backports only.Source§unsafe fn unchecked_neg(self) -> Self
unsafe fn unchecked_neg(self) -> Self
nightly_backports only.fn overflowing_add(self, rhs: Self) -> (Self, bool)
fn overflowing_add_unsigned(self, rhs: Self::Uint) -> (Self, bool)
fn overflowing_sub(self, rhs: Self) -> (Self, bool)
fn overflowing_sub_unsigned(self, rhs: Self::Uint) -> (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_shl(self, rhs: u32) -> (Self, bool)
fn overflowing_shr(self, rhs: u32) -> (Self, bool)
fn overflowing_neg(self) -> (Self, bool)
fn overflowing_abs(self) -> (Self, bool)
fn overflowing_pow(self, exp: u32) -> (Self, bool)
Source§fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
nightly_backports only.Source§fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Uint, Self)
nightly_backports only.Source§fn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Uint, Self)
fn carrying_mul_add( self, mul: Self, add: Self, carry: Self, ) -> (Self::Uint, Self)
nightly_backports only.Source§fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
nightly_backports only.