Primitive Type i128
Expand description
The 128-bit signed integer type.
§ABI compatibility
Rust’s i128 is expected to be ABI-compatible with C’s __int128 on platforms where the type
is available, which includes most 64-bit architectures. If any platforms that do not specify
__int128 are updated to introduce it, the Rust i128 ABI on relevant targets will be changed
to match.
It is important to note that in C, __int128 is not the same as _BitInt(128), and the two
types are allowed to have different ABIs. In particular, on x86, __int128 and _BitInt(128)
do not use the same alignment. i128 is intended to always match __int128 and does not
attempt to match _BitInt(128) on platforms without __int128.
Implementations§
Source§impl i128
impl i128
1.43.0 · Sourcepub const MIN: Self = -170_141_183_460_469_231_731_687_303_715_884_105_728i128
pub const MIN: Self = -170_141_183_460_469_231_731_687_303_715_884_105_728i128
The smallest value that can be represented by this integer type (−2127).
§Examples
1.43.0 · Sourcepub const MAX: Self = 170_141_183_460_469_231_731_687_303_715_884_105_727i128
pub const MAX: Self = 170_141_183_460_469_231_731_687_303_715_884_105_727i128
The largest value that can be represented by this integer type (2127 − 1).
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn count_ones(self) -> u32
pub const fn count_ones(self) -> u32
Returns the number of ones in the binary representation of self.
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn count_zeros(self) -> u32
pub const fn count_zeros(self) -> u32
Returns the number of zeros in the binary representation of self.
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn leading_zeros(self) -> u32
pub const fn leading_zeros(self) -> u32
1.0.0 (const: 1.32.0) · Sourcepub const fn rotate_left(self, n: u32) -> Self
pub const 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.
rotate_left(n) is equivalent to applying rotate_left(1) a total of n times. In
particular, a rotation by the number of bits in self returns the input value
unchanged.
Please note this isn’t the same operation as the << shifting operator!
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn from_le(x: Self) -> Self
pub const fn from_le(x: Self) -> Self
Converts an integer from little endian to the target’s endianness.
On little endian this is a no-op. On big endian the bytes are swapped.
See also from_le_bytes().
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn to_le(self) -> Self
pub const fn to_le(self) -> Self
Swaps bytes of self on big endian targets.
On little endian this is a no-op.
The returned value has the same type as self, and will be interpreted
as (a potentially different) value of a native-endian
i128.
See to_le_bytes() for a type-safe alternative.
§Examples
1.0.0 (const: 1.47.0) · Sourcepub const fn checked_add(self, rhs: Self) -> Option<Self>
pub const fn checked_add(self, rhs: Self) -> Option<Self>
Checked integer addition. Computes self + rhs, returning None
if overflow occurred.
§Examples
1.66.0 (const: 1.66.0) · Sourcepub const fn checked_add_unsigned(self, rhs: u128) -> Option<Self>
pub const fn checked_add_unsigned(self, rhs: u128) -> Option<Self>
Checked addition with an unsigned integer. Computes self + rhs,
returning None if overflow occurred.
§Examples
1.0.0 (const: 1.47.0) · Sourcepub const fn checked_sub(self, rhs: Self) -> Option<Self>
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
Checked integer subtraction. Computes self - rhs, returning None if
overflow occurred.
§Examples
1.66.0 (const: 1.66.0) · Sourcepub const fn checked_sub_unsigned(self, rhs: u128) -> Option<Self>
pub const fn checked_sub_unsigned(self, rhs: u128) -> Option<Self>
Checked subtraction with an unsigned integer. Computes self - rhs,
returning None if overflow occurred.
§Examples
1.0.0 (const: 1.47.0) · Sourcepub const fn checked_mul(self, rhs: Self) -> Option<Self>
pub const fn checked_mul(self, rhs: Self) -> Option<Self>
Checked integer multiplication. Computes self * rhs, returning None if
overflow occurred.
§Examples
1.94.0 (const: 1.94.0) · Sourcepub const unsafe fn unchecked_neg(self) -> Self
pub const unsafe fn unchecked_neg(self) -> Self
Unchecked negation. Computes -self, assuming overflow cannot occur.
§Safety
This results in undefined behavior when
self == i128::MIN,
i.e. when checked_neg would return None.
1.94.0 (const: 1.94.0) · Sourcepub const unsafe fn unchecked_shl(self, rhs: u32) -> Self
pub const unsafe fn unchecked_shl(self, rhs: u32) -> Self
Unchecked shift left. Computes self << rhs, assuming that
rhs is less than the number of bits in self.
§Safety
This results in undefined behavior if rhs is larger than
or equal to the number of bits in self,
i.e. when checked_shl would return None.
1.94.0 (const: 1.94.0) · Sourcepub const unsafe fn unchecked_shr(self, rhs: u32) -> Self
pub const unsafe fn unchecked_shr(self, rhs: u32) -> Self
Unchecked shift right. Computes self >> rhs, assuming that
rhs is less than the number of bits in self.
§Safety
This results in undefined behavior if rhs is larger than
or equal to the number of bits in self,
i.e. when checked_shr would return None.
1.0.0 (const: 1.32.0) · Sourcepub const fn wrapping_add(self, rhs: Self) -> Self
pub const fn wrapping_add(self, rhs: Self) -> Self
Wrapping (modular) addition. Computes self + rhs, wrapping around at the
boundary of the type.
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn wrapping_sub(self, rhs: Self) -> Self
pub const fn wrapping_sub(self, rhs: Self) -> Self
Wrapping (modular) subtraction. Computes self - rhs, wrapping around at the
boundary of the type.
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn wrapping_mul(self, rhs: Self) -> Self
pub const fn wrapping_mul(self, rhs: Self) -> Self
Wrapping (modular) multiplication. Computes self * rhs, wrapping around at
the boundary of the type.
§Examples
1.2.0 (const: 1.32.0) · Sourcepub const fn wrapping_neg(self) -> Self
pub const fn wrapping_neg(self) -> Self
Wrapping (modular) negation. Computes -self, wrapping around at the boundary
of the type.
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.
§Examples
1.2.0 (const: 1.32.0) · Sourcepub const fn wrapping_shl(self, rhs: u32) -> Self
pub const 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 bitwidth 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.
§Examples
1.2.0 (const: 1.32.0) · Sourcepub const fn wrapping_shr(self, rhs: u32) -> Self
pub const 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 bitwidth 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.
§Examples
1.13.0 (const: 1.32.0) · Sourcepub const fn wrapping_abs(self) -> Self
pub const fn wrapping_abs(self) -> Self
Wrapping (modular) absolute value. Computes self.abs(), wrapping around at
the boundary of the type.
The only case where such wrapping can occur is when one takes the absolute value of 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.
§Examples
1.51.0 (const: 1.51.0) · Sourcepub const fn unsigned_abs(self) -> u128
pub const fn unsigned_abs(self) -> u128
Computes the absolute value of self without any wrapping
or panicking.
§Examples
1.7.0 (const: 1.32.0) · Sourcepub const fn overflowing_add(self, rhs: Self) -> (Self, bool)
pub const 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.
§Examples
1.66.0 (const: 1.66.0) · Sourcepub const fn overflowing_add_unsigned(self, rhs: u128) -> (Self, bool)
pub const fn overflowing_add_unsigned(self, rhs: u128) -> (Self, bool)
Calculates self + rhs with an unsigned 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.
§Examples
1.7.0 (const: 1.32.0) · Sourcepub const fn overflowing_sub(self, rhs: Self) -> (Self, bool)
pub const 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.
§Examples
1.66.0 (const: 1.66.0) · Sourcepub const fn overflowing_sub_unsigned(self, rhs: u128) -> (Self, bool)
pub const fn overflowing_sub_unsigned(self, rhs: u128) -> (Self, bool)
Calculates self - rhs with an unsigned 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.
§Examples
1.7.0 (const: 1.32.0) · Sourcepub const fn overflowing_mul(self, rhs: Self) -> (Self, bool)
pub const 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.
§Examples
1.7.0 (const: 1.32.0) · Sourcepub const fn overflowing_neg(self) -> (Self, bool)
pub const 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.
§Examples
1.67.0 (const: 1.67.0) · Sourcepub const fn checked_ilog2(self) -> Option<u32>
pub const fn checked_ilog2(self) -> Option<u32>
Returns the base 2 logarithm of the number, rounded down.
Returns None if the number is negative or zero.
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn abs(self) -> Self
pub const fn abs(self) -> Self
Computes the absolute value of self.
§Overflow behavior
The absolute value of
i128::MIN
cannot be represented as an
i128,
and attempting to calculate it will cause an overflow. This means
that code in debug mode will trigger a panic on this case and
optimized code will return
i128::MIN
without a panic. If you do not want this behavior, consider
using unsigned_abs instead.
§Examples
1.60.0 (const: 1.60.0) · Sourcepub const fn abs_diff(self, other: Self) -> u128
pub const fn abs_diff(self, other: Self) -> u128
Computes the absolute difference between self and other.
This function always returns the correct answer without overflow or panics by returning an unsigned integer.
§Examples
1.0.0 (const: 1.32.0) · Sourcepub const fn is_negative(self) -> bool
pub const fn is_negative(self) -> bool
Returns true if self is negative and false if the number is zero or
positive.
§Examples
1.32.0 (const: 1.44.0) · Sourcepub const fn to_le_bytes(self) -> [u8; 16]
pub const fn to_le_bytes(self) -> [u8; 16]
Returns the memory representation of this integer as a byte array in little-endian byte order.
§Examples
1.32.0 (const: 1.44.0) · Sourcepub const fn to_ne_bytes(self) -> [u8; 16]
pub const fn to_ne_bytes(self) -> [u8; 16]
Returns the memory representation of this integer as a byte array in native byte order.
As the target platform’s native endianness is used, portable code
should use to_be_bytes or to_le_bytes, as appropriate,
instead.
§Examples
let bytes = 0x12345678901234567890123456789012i128.to_ne_bytes();
assert_eq!(
bytes,
if cfg!(target_endian = "big") {
[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]
} else {
[0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]
}
);1.32.0 (const: 1.44.0) · Sourcepub const fn from_le_bytes(bytes: [u8; 16]) -> Self
pub const fn from_le_bytes(bytes: [u8; 16]) -> Self
Creates an integer value from its representation as a byte array in little endian.
§Examples
let value = i128::from_le_bytes([0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);
assert_eq!(value, 0x12345678901234567890123456789012);When starting from a slice rather than an array, fallible conversion APIs can be used:
1.32.0 (const: 1.44.0) · Sourcepub const fn from_ne_bytes(bytes: [u8; 16]) -> Self
pub const fn from_ne_bytes(bytes: [u8; 16]) -> Self
Creates an integer value from its memory representation as a byte array in native endianness.
As the target platform’s native endianness is used, portable code
likely wants to use from_be_bytes or from_le_bytes, as
appropriate instead.
§Examples
let value = i128::from_ne_bytes(if cfg!(target_endian = "big") {
[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]
} else {
[0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]
});
assert_eq!(value, 0x12345678901234567890123456789012);When starting from a slice rather than an array, fallible conversion APIs can be used:
Trait Implementations§
1.22.0 (const: unstable) · Source§impl AddAssign<&i128> for i128
impl AddAssign<&i128> for i128
Source§fn add_assign(&mut self, other: &i128)
fn add_assign(&mut self, other: &i128)
+= operation. Read more1.8.0 (const: unstable) · Source§impl AddAssign for i128
impl AddAssign for i128
Source§fn add_assign(&mut self, other: i128)
fn add_assign(&mut self, other: i128)
+= operation. Read more1.22.0 (const: unstable) · Source§impl BitAndAssign<&i128> for i128
impl BitAndAssign<&i128> for i128
Source§fn bitand_assign(&mut self, other: &i128)
fn bitand_assign(&mut self, other: &i128)
&= operation. Read more1.8.0 (const: unstable) · Source§impl BitAndAssign for i128
impl BitAndAssign for i128
Source§fn bitand_assign(&mut self, other: i128)
fn bitand_assign(&mut self, other: i128)
&= operation. Read more1.22.0 (const: unstable) · Source§impl BitOrAssign<&i128> for i128
impl BitOrAssign<&i128> for i128
Source§fn bitor_assign(&mut self, other: &i128)
fn bitor_assign(&mut self, other: &i128)
|= operation. Read more1.8.0 (const: unstable) · Source§impl BitOrAssign for i128
impl BitOrAssign for i128
Source§fn bitor_assign(&mut self, other: i128)
fn bitor_assign(&mut self, other: i128)
|= operation. Read more1.22.0 (const: unstable) · Source§impl BitXorAssign<&i128> for i128
impl BitXorAssign<&i128> for i128
Source§fn bitxor_assign(&mut self, other: &i128)
fn bitxor_assign(&mut self, other: &i128)
^= operation. Read more1.8.0 (const: unstable) · Source§impl BitXorAssign for i128
impl BitXorAssign for i128
Source§fn bitxor_assign(&mut self, other: i128)
fn bitxor_assign(&mut self, other: i128)
^= operation. Read moreSource§impl DisjointBitOr for i128
impl DisjointBitOr for i128
Source§unsafe fn disjoint_bitor(self, other: Self) -> Self
unsafe fn disjoint_bitor(self, other: Self) -> Self
core_intrinsics_fallbacks)super::disjoint_bitor; we just need the trait indirection to handle
different types since calling intrinsics with generics doesn’t work.1.0.0 (const: unstable) · Source§impl Div for i128
This operation rounds towards zero, truncating any
fractional part of the exact result.
impl Div for i128
This operation rounds towards zero, truncating any fractional part of the exact result.
§Panics
This operation will panic if other == 0 or the division results in overflow.
1.22.0 (const: unstable) · Source§impl DivAssign<&i128> for i128
impl DivAssign<&i128> for i128
Source§fn div_assign(&mut self, other: &i128)
fn div_assign(&mut self, other: &i128)
/= operation. Read more1.8.0 (const: unstable) · Source§impl DivAssign for i128
impl DivAssign for i128
Source§fn div_assign(&mut self, other: i128)
fn div_assign(&mut self, other: i128)
/= operation. Read more1.22.0 (const: unstable) · Source§impl MulAssign<&i128> for i128
impl MulAssign<&i128> for i128
Source§fn mul_assign(&mut self, other: &i128)
fn mul_assign(&mut self, other: &i128)
*= operation. Read more1.8.0 (const: unstable) · Source§impl MulAssign for i128
impl MulAssign for i128
Source§fn mul_assign(&mut self, other: i128)
fn mul_assign(&mut self, other: i128)
*= operation. Read more1.0.0 (const: unstable) · Source§impl Ord for i128
impl Ord for i128
1.0.0 (const: unstable) · Source§impl PartialOrd for i128
impl PartialOrd for i128
1.0.0 (const: unstable) · Source§impl Rem for i128
This operation satisfies n % d == n - (n / d) * d. The
result has the same sign as the left operand.
impl Rem for i128
This operation satisfies n % d == n - (n / d) * d. The
result has the same sign as the left operand.
§Panics
This operation will panic if other == 0 or if self / other results in overflow.
1.22.0 (const: unstable) · Source§impl RemAssign<&i128> for i128
impl RemAssign<&i128> for i128
Source§fn rem_assign(&mut self, other: &i128)
fn rem_assign(&mut self, other: &i128)
%= operation. Read more1.8.0 (const: unstable) · Source§impl RemAssign for i128
impl RemAssign for i128
Source§fn rem_assign(&mut self, other: i128)
fn rem_assign(&mut self, other: i128)
%= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for i128
impl ShlAssign<&i128> for i128
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for i16
impl ShlAssign<&i128> for i16
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for i32
impl ShlAssign<&i128> for i32
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for i64
impl ShlAssign<&i128> for i64
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for i8
impl ShlAssign<&i128> for i8
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for isize
impl ShlAssign<&i128> for isize
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for u128
impl ShlAssign<&i128> for u128
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for u16
impl ShlAssign<&i128> for u16
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for u32
impl ShlAssign<&i128> for u32
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for u64
impl ShlAssign<&i128> for u64
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for u8
impl ShlAssign<&i128> for u8
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i128> for usize
impl ShlAssign<&i128> for usize
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i16> for i128
impl ShlAssign<&i16> for i128
Source§fn shl_assign(&mut self, other: &i16)
fn shl_assign(&mut self, other: &i16)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i32> for i128
impl ShlAssign<&i32> for i128
Source§fn shl_assign(&mut self, other: &i32)
fn shl_assign(&mut self, other: &i32)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i64> for i128
impl ShlAssign<&i64> for i128
Source§fn shl_assign(&mut self, other: &i64)
fn shl_assign(&mut self, other: &i64)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&i8> for i128
impl ShlAssign<&i8> for i128
Source§fn shl_assign(&mut self, other: &i8)
fn shl_assign(&mut self, other: &i8)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&isize> for i128
impl ShlAssign<&isize> for i128
Source§fn shl_assign(&mut self, other: &isize)
fn shl_assign(&mut self, other: &isize)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&u128> for i128
impl ShlAssign<&u128> for i128
Source§fn shl_assign(&mut self, other: &u128)
fn shl_assign(&mut self, other: &u128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&u16> for i128
impl ShlAssign<&u16> for i128
Source§fn shl_assign(&mut self, other: &u16)
fn shl_assign(&mut self, other: &u16)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&u32> for i128
impl ShlAssign<&u32> for i128
Source§fn shl_assign(&mut self, other: &u32)
fn shl_assign(&mut self, other: &u32)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&u64> for i128
impl ShlAssign<&u64> for i128
Source§fn shl_assign(&mut self, other: &u64)
fn shl_assign(&mut self, other: &u64)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&u8> for i128
impl ShlAssign<&u8> for i128
Source§fn shl_assign(&mut self, other: &u8)
fn shl_assign(&mut self, other: &u8)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShlAssign<&usize> for i128
impl ShlAssign<&usize> for i128
Source§fn shl_assign(&mut self, other: &usize)
fn shl_assign(&mut self, other: &usize)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for i16
impl ShlAssign<i128> for i16
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for i32
impl ShlAssign<i128> for i32
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for i64
impl ShlAssign<i128> for i64
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for i8
impl ShlAssign<i128> for i8
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for isize
impl ShlAssign<i128> for isize
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for u128
impl ShlAssign<i128> for u128
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for u16
impl ShlAssign<i128> for u16
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for u32
impl ShlAssign<i128> for u32
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for u64
impl ShlAssign<i128> for u64
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for u8
impl ShlAssign<i128> for u8
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i128> for usize
impl ShlAssign<i128> for usize
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i16> for i128
impl ShlAssign<i16> for i128
Source§fn shl_assign(&mut self, other: i16)
fn shl_assign(&mut self, other: i16)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i32> for i128
impl ShlAssign<i32> for i128
Source§fn shl_assign(&mut self, other: i32)
fn shl_assign(&mut self, other: i32)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i64> for i128
impl ShlAssign<i64> for i128
Source§fn shl_assign(&mut self, other: i64)
fn shl_assign(&mut self, other: i64)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<i8> for i128
impl ShlAssign<i8> for i128
Source§fn shl_assign(&mut self, other: i8)
fn shl_assign(&mut self, other: i8)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<isize> for i128
impl ShlAssign<isize> for i128
Source§fn shl_assign(&mut self, other: isize)
fn shl_assign(&mut self, other: isize)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<u128> for i128
impl ShlAssign<u128> for i128
Source§fn shl_assign(&mut self, other: u128)
fn shl_assign(&mut self, other: u128)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<u16> for i128
impl ShlAssign<u16> for i128
Source§fn shl_assign(&mut self, other: u16)
fn shl_assign(&mut self, other: u16)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<u32> for i128
impl ShlAssign<u32> for i128
Source§fn shl_assign(&mut self, other: u32)
fn shl_assign(&mut self, other: u32)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<u64> for i128
impl ShlAssign<u64> for i128
Source§fn shl_assign(&mut self, other: u64)
fn shl_assign(&mut self, other: u64)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<u8> for i128
impl ShlAssign<u8> for i128
Source§fn shl_assign(&mut self, other: u8)
fn shl_assign(&mut self, other: u8)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign<usize> for i128
impl ShlAssign<usize> for i128
Source§fn shl_assign(&mut self, other: usize)
fn shl_assign(&mut self, other: usize)
<<= operation. Read more1.8.0 (const: unstable) · Source§impl ShlAssign for i128
impl ShlAssign for i128
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for i128
impl ShrAssign<&i128> for i128
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for i16
impl ShrAssign<&i128> for i16
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for i32
impl ShrAssign<&i128> for i32
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for i64
impl ShrAssign<&i128> for i64
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for i8
impl ShrAssign<&i128> for i8
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for isize
impl ShrAssign<&i128> for isize
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for u128
impl ShrAssign<&i128> for u128
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for u16
impl ShrAssign<&i128> for u16
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for u32
impl ShrAssign<&i128> for u32
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for u64
impl ShrAssign<&i128> for u64
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for u8
impl ShrAssign<&i128> for u8
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i128> for usize
impl ShrAssign<&i128> for usize
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i16> for i128
impl ShrAssign<&i16> for i128
Source§fn shr_assign(&mut self, other: &i16)
fn shr_assign(&mut self, other: &i16)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i32> for i128
impl ShrAssign<&i32> for i128
Source§fn shr_assign(&mut self, other: &i32)
fn shr_assign(&mut self, other: &i32)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i64> for i128
impl ShrAssign<&i64> for i128
Source§fn shr_assign(&mut self, other: &i64)
fn shr_assign(&mut self, other: &i64)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&i8> for i128
impl ShrAssign<&i8> for i128
Source§fn shr_assign(&mut self, other: &i8)
fn shr_assign(&mut self, other: &i8)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&isize> for i128
impl ShrAssign<&isize> for i128
Source§fn shr_assign(&mut self, other: &isize)
fn shr_assign(&mut self, other: &isize)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&u128> for i128
impl ShrAssign<&u128> for i128
Source§fn shr_assign(&mut self, other: &u128)
fn shr_assign(&mut self, other: &u128)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&u16> for i128
impl ShrAssign<&u16> for i128
Source§fn shr_assign(&mut self, other: &u16)
fn shr_assign(&mut self, other: &u16)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&u32> for i128
impl ShrAssign<&u32> for i128
Source§fn shr_assign(&mut self, other: &u32)
fn shr_assign(&mut self, other: &u32)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&u64> for i128
impl ShrAssign<&u64> for i128
Source§fn shr_assign(&mut self, other: &u64)
fn shr_assign(&mut self, other: &u64)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&u8> for i128
impl ShrAssign<&u8> for i128
Source§fn shr_assign(&mut self, other: &u8)
fn shr_assign(&mut self, other: &u8)
>>= operation. Read more1.22.0 (const: unstable) · Source§impl ShrAssign<&usize> for i128
impl ShrAssign<&usize> for i128
Source§fn shr_assign(&mut self, other: &usize)
fn shr_assign(&mut self, other: &usize)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for i16
impl ShrAssign<i128> for i16
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for i32
impl ShrAssign<i128> for i32
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for i64
impl ShrAssign<i128> for i64
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for i8
impl ShrAssign<i128> for i8
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for isize
impl ShrAssign<i128> for isize
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for u128
impl ShrAssign<i128> for u128
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for u16
impl ShrAssign<i128> for u16
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for u32
impl ShrAssign<i128> for u32
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for u64
impl ShrAssign<i128> for u64
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for u8
impl ShrAssign<i128> for u8
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i128> for usize
impl ShrAssign<i128> for usize
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i16> for i128
impl ShrAssign<i16> for i128
Source§fn shr_assign(&mut self, other: i16)
fn shr_assign(&mut self, other: i16)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i32> for i128
impl ShrAssign<i32> for i128
Source§fn shr_assign(&mut self, other: i32)
fn shr_assign(&mut self, other: i32)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i64> for i128
impl ShrAssign<i64> for i128
Source§fn shr_assign(&mut self, other: i64)
fn shr_assign(&mut self, other: i64)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<i8> for i128
impl ShrAssign<i8> for i128
Source§fn shr_assign(&mut self, other: i8)
fn shr_assign(&mut self, other: i8)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<isize> for i128
impl ShrAssign<isize> for i128
Source§fn shr_assign(&mut self, other: isize)
fn shr_assign(&mut self, other: isize)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<u128> for i128
impl ShrAssign<u128> for i128
Source§fn shr_assign(&mut self, other: u128)
fn shr_assign(&mut self, other: u128)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<u16> for i128
impl ShrAssign<u16> for i128
Source§fn shr_assign(&mut self, other: u16)
fn shr_assign(&mut self, other: u16)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<u32> for i128
impl ShrAssign<u32> for i128
Source§fn shr_assign(&mut self, other: u32)
fn shr_assign(&mut self, other: u32)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<u64> for i128
impl ShrAssign<u64> for i128
Source§fn shr_assign(&mut self, other: u64)
fn shr_assign(&mut self, other: u64)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<u8> for i128
impl ShrAssign<u8> for i128
Source§fn shr_assign(&mut self, other: u8)
fn shr_assign(&mut self, other: u8)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign<usize> for i128
impl ShrAssign<usize> for i128
Source§fn shr_assign(&mut self, other: usize)
fn shr_assign(&mut self, other: usize)
>>= operation. Read more1.8.0 (const: unstable) · Source§impl ShrAssign for i128
impl ShrAssign for i128
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>= operation. Read moreSource§impl Step for i128
impl Step for i128
Source§fn forward(start: Self, n: usize) -> Self
fn forward(start: Self, n: usize) -> Self
step_trait #42168)Source§fn backward(start: Self, n: usize) -> Self
fn backward(start: Self, n: usize) -> Self
step_trait #42168)Source§unsafe fn forward_unchecked(start: Self, n: usize) -> Self
unsafe fn forward_unchecked(start: Self, n: usize) -> Self
step_trait #42168)Source§unsafe fn backward_unchecked(start: Self, n: usize) -> Self
unsafe fn backward_unchecked(start: Self, n: usize) -> Self
step_trait #42168)Source§fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>)
fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>)
step_trait #42168)start to end
like Iterator::size_hint(). Read more1.22.0 (const: unstable) · Source§impl SubAssign<&i128> for i128
impl SubAssign<&i128> for i128
Source§fn sub_assign(&mut self, other: &i128)
fn sub_assign(&mut self, other: &i128)
-= operation. Read more1.8.0 (const: unstable) · Source§impl SubAssign for i128
impl SubAssign for i128
Source§fn sub_assign(&mut self, other: i128)
fn sub_assign(&mut self, other: i128)
-= operation. Read more