Struct aint::Aint

source ·
pub struct Aint<R: Sealed, const WIDTH: u32>(/* private fields */);
Expand description

An integer with a given representation, R, and bit width, WIDTH.

Implementations§

source§

impl<const WIDTH: u32> Aint<u8, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: u8) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: u8) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: u8) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: u8) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: u8) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> u8

Returns the value of this integer as the underlying representation type.

source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs_diff(self, rhs: Self) -> Self

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl<const WIDTH: u32> Aint<u16, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: u16) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: u16) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: u16) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: u16) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: u16) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> u16

Returns the value of this integer as the underlying representation type.

source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs_diff(self, rhs: Self) -> Self

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl<const WIDTH: u32> Aint<u32, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: u32) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: u32) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: u32) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: u32) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: u32) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> u32

Returns the value of this integer as the underlying representation type.

source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs_diff(self, rhs: Self) -> Self

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl Aint<u32, 24>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 3]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 3]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 3]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 3]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 3]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 3]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl<const WIDTH: u32> Aint<u64, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: u64) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: u64) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: u64) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: u64) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: u64) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> u64

Returns the value of this integer as the underlying representation type.

source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs_diff(self, rhs: Self) -> Self

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl Aint<u64, 40>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 5]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 5]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 5]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 5]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 5]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 5]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<u64, 48>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 6]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 6]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 6]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 6]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 6]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 6]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<u64, 56>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 7]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 7]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 7]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 7]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 7]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 7]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl<const WIDTH: u32> Aint<u128, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: u128) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: u128) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: u128) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: u128) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: u128) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> u128

Returns the value of this integer as the underlying representation type.

source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs_diff(self, rhs: Self) -> Self

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl Aint<u128, 72>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 9]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 9]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 9]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 9]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 9]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 9]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<u128, 80>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 10]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 10]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 10]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 10]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 10]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 10]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<u128, 88>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 11]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 11]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 11]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 11]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 11]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 11]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<u128, 96>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 12]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 12]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 12]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 12]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 12]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 12]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<u128, 104>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 13]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 13]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 13]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 13]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 13]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 13]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<u128, 112>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 14]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 14]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 14]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 14]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 14]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 14]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<u128, 120>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 15]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 15]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 15]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 15]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 15]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 15]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl<const WIDTH: u32> Aint<i8, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: i8) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: i8) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: i8) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: i8) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: i8) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> i8

Returns the value of this integer as the underlying representation type.

source

pub const fn is_negative(self) -> bool

Returns true if this integer is less than zero.

source

pub const fn is_positive(self) -> bool

Returns true if this integer is greater than zero.

source

pub const fn signum(self) -> Self

Returns the sign of the integer.

  • If self < 0, returns -1
  • If self > 0, returns 1
  • If self == 0, returns 0
source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn neg(self) -> Self

Calculates the negative of this integer.

This method works as a const capable alternative to -self.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_abs(self) -> Self

Wrapping (modular) aboslute value. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

pub const fn overflowing_abs(self) -> (Self, bool)

Calculates self.abs(), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs(self) -> Self

Computes the absolute value of this integer.

source

pub const fn abs_diff(self, rhs: Self) -> Aint<u8, WIDTH>

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl<const WIDTH: u32> Aint<i16, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: i16) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: i16) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: i16) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: i16) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: i16) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> i16

Returns the value of this integer as the underlying representation type.

source

pub const fn is_negative(self) -> bool

Returns true if this integer is less than zero.

source

pub const fn is_positive(self) -> bool

Returns true if this integer is greater than zero.

source

pub const fn signum(self) -> Self

Returns the sign of the integer.

  • If self < 0, returns -1
  • If self > 0, returns 1
  • If self == 0, returns 0
source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn neg(self) -> Self

Calculates the negative of this integer.

This method works as a const capable alternative to -self.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_abs(self) -> Self

Wrapping (modular) aboslute value. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

pub const fn overflowing_abs(self) -> (Self, bool)

Calculates self.abs(), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs(self) -> Self

Computes the absolute value of this integer.

source

pub const fn abs_diff(self, rhs: Self) -> Aint<u16, WIDTH>

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl<const WIDTH: u32> Aint<i32, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: i32) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: i32) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: i32) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: i32) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: i32) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> i32

Returns the value of this integer as the underlying representation type.

source

pub const fn is_negative(self) -> bool

Returns true if this integer is less than zero.

source

pub const fn is_positive(self) -> bool

Returns true if this integer is greater than zero.

source

pub const fn signum(self) -> Self

Returns the sign of the integer.

  • If self < 0, returns -1
  • If self > 0, returns 1
  • If self == 0, returns 0
source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn neg(self) -> Self

Calculates the negative of this integer.

This method works as a const capable alternative to -self.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_abs(self) -> Self

Wrapping (modular) aboslute value. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

pub const fn overflowing_abs(self) -> (Self, bool)

Calculates self.abs(), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs(self) -> Self

Computes the absolute value of this integer.

source

pub const fn abs_diff(self, rhs: Self) -> Aint<u32, WIDTH>

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl Aint<i32, 24>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 3]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 3]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 3]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 3]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 3]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 3]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl<const WIDTH: u32> Aint<i64, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: i64) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: i64) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: i64) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: i64) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: i64) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> i64

Returns the value of this integer as the underlying representation type.

source

pub const fn is_negative(self) -> bool

Returns true if this integer is less than zero.

source

pub const fn is_positive(self) -> bool

Returns true if this integer is greater than zero.

source

pub const fn signum(self) -> Self

Returns the sign of the integer.

  • If self < 0, returns -1
  • If self > 0, returns 1
  • If self == 0, returns 0
source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn neg(self) -> Self

Calculates the negative of this integer.

This method works as a const capable alternative to -self.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_abs(self) -> Self

Wrapping (modular) aboslute value. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

pub const fn overflowing_abs(self) -> (Self, bool)

Calculates self.abs(), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs(self) -> Self

Computes the absolute value of this integer.

source

pub const fn abs_diff(self, rhs: Self) -> Aint<u64, WIDTH>

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl Aint<i64, 40>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 5]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 5]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 5]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 5]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 5]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 5]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<i64, 48>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 6]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 6]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 6]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 6]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 6]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 6]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<i64, 56>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 7]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 7]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 7]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 7]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 7]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 7]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl<const WIDTH: u32> Aint<i128, WIDTH>

source

pub const BITS: u32 = _

The size of this integer type in bits.

source

pub const MIN: Self = _

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

source

pub const MAX: Self = _

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

source

pub const unsafe fn new_unchecked(repr: i128) -> Self

Creates a new integer value from the underlying representation type, unchecked.

Safety

The representation type value must be within the range of valid values of this type. That is, the value must be greater or equal to MIN and less or equal to MAX.

source

pub const fn new(repr: i128) -> Option<Self>

Creates a new integer value from the underlying representation type.

The returned value is None if the representation value is outside the range of valid values of this integer type.

source

pub const fn new_wrapping(repr: i128) -> Self

Creates a new integer value from the underlying representation type.

The returned value is wrapped as though the representation value were calculated using wrapping operations, such as wrapping_add.

source

pub const fn new_saturating(repr: i128) -> Self

Creates a new integer value from the underlying representation type.

The returned value is saturated to the bounds of this integer’s value range. If the representation value is greater than MAX, the returned value will be MAX. If the representation value is less than MIN, the returned value will be MIN.

source

pub const fn new_overflowing(repr: i128) -> (Self, bool)

Creates a new integer from the underlying representation type.

The returned tuple contains the new integer and a bool indicating if the representation value overflowed the new integer. In the case of overflow, the new integer has a value as if it were produced from new_wrapping.

source

pub const fn repr(self) -> i128

Returns the value of this integer as the underlying representation type.

source

pub const fn is_negative(self) -> bool

Returns true if this integer is less than zero.

source

pub const fn is_positive(self) -> bool

Returns true if this integer is greater than zero.

source

pub const fn signum(self) -> Self

Returns the sign of the integer.

  • If self < 0, returns -1
  • If self > 0, returns 1
  • If self == 0, returns 0
source

pub const fn count_ones(self) -> u32

Returns the number of ones in the binary representation of this integer.

source

pub const fn count_zeros(self) -> u32

Returns the number of zeros in the binary representatino of this integer.

source

pub const fn leading_zeros(self) -> u32

Returns the number of leading zeros in the binary represnetation of this integer.

source

pub const fn trailing_zeros(self) -> u32

Returns the number of trailing zeros in the binary representatino of this integer.

source

pub const fn leading_ones(self) -> u32

Returns the number of leading ones in the binary representation of this integer.

source

pub const fn trailing_ones(self) -> u32

Returns the number of trailing ones in the binary representation of this integer.

source

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

Performs a left bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the << operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

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

Performs a right bit shift by n, wrapping the truncated bits back to the end.

Note that unlike the >> operator, all values of n are valid. A value of n, that is greater than or equal to BITS, is the equivalent to using the value n % Self::BITS.

source

pub const fn reverse_bits(self) -> Self

Reverses the order of the bits in the binary representation of this integer.

source

pub const fn neg(self) -> Self

Calculates the negative of this integer.

This method works as a const capable alternative to -self.

source

pub const fn add(self, rhs: Self) -> Self

Calculates the sum of this integer with another integer.

This method works as a const capable alternative to self + rhs.

source

pub const fn sub(self, rhs: Self) -> Self

Calculates the difference of this integer with another integer.

This method works as a const capable alternative to self - rhs.

source

pub const fn mul(self, rhs: Self) -> Self

Calculates the product of this integer with another integer.

This method works as a const capable alternative to self * rhs.

source

pub const fn div(self, rhs: Self) -> Self

Calculates the quotient of this integer over another integer.

This method works as a const capable alternative to self / rhs.

source

pub const fn rem(self, rhs: Self) -> Self

Calculates the remainder of this integer over another integer.

This method works as a const capable alternative to self % rhs.

source

pub const fn bitand(self, rhs: Self) -> Self

Calculates the bitwise and of this integer with another integer.

This method works as a const capable alternative to self & rhs.

source

pub const fn bitor(self, rhs: Self) -> Self

Calculates the bitwise or of this integer with another integer.

This method works as a const capable alternative to self | rhs.

source

pub const fn bitxor(self, rhs: Self) -> Self

Calculates the bitwise exclusive-or of this integer with another integer.

This method works as a const capable alternative to self ^ rhs.

source

pub const fn not(self) -> Self

Calculates the bitwise negation of this integer.

This method works as a const capable alternative to !self.

source

pub const fn shl(self, rhs: u32) -> Self

Calculates the left bitwise shift of this integer by rhs.

This method works as a const capable alternative to self << rhs.

source

pub const fn shr(self, rhs: u32) -> Self

Calculates the right bitwise shift of this integer by rhs.

This method works as a const capable alternative to self >> rhs.

source

pub const fn ilog(self, base: Self) -> u32

Calculates the logarithm of this integer with respect to an arbitrary base, rounded down.

The ilog2 and ilog10 methods should be preferred when applicable, as they are generally more optimized than this method since the base of the logarithm is not arbitrary.

Panics

This method will panic if self is less than or equal to zero, or if base is less than 2.

source

pub const fn ilog2(self) -> u32

Calculates the base 2 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn ilog10(self) -> u32

Calculates the base 10 logarithm of this integer, rounded down.

Panics

This method will panic if self is less than or equal to zero.

source

pub const fn eq(self, rhs: Self) -> bool

Returns true if self and rhs are equal.

This method works as a const capable alternative to self == rhs.

source

pub const fn ne(self, rhs: Self) -> bool

Returns true if self and rhs are not equal.

This method works as a const capable alternative to self != rhs.

source

pub const fn lt(self, rhs: Self) -> bool

Returns true if self is less than rhs.

This method works as a const capable alternative to self < rhs.

source

pub const fn le(self, rhs: Self) -> bool

Returns true if self is less than or equal to rhs.

This method works as a const capable alternative to self <= rhs.

source

pub const fn gt(self, rhs: Self) -> bool

Returns true if self is greater than rhs.

This method works as a const capable alternative to self > rhs.

source

pub const fn ge(self, rhs: Self) -> bool

Returns true if self is greater than or equal to rhs.

This method works as a const capable alternative to self >= rhs.

source

pub const fn cmp(self, rhs: Self) -> Ordering

Returns the ordering of self with respect to rhs.

This method works as a const capable alternative to Ord::cmp(self, rhs).

source

pub const fn min(self, other: Self) -> Self

Returns the minimum of self and other.

This method works as a const capable alternative to Ord::min(self, rhs).

source

pub const fn max(self, other: Self) -> Self

Returns the maximum of self and other.

This method works as a const capable alternative to Ord::max(self, rhs).

source

pub const fn clamp(self, min: Self, max: Self) -> Self

Returns the value of this integer, clamped between min and max.

This method works as a const capable alternative to Ord::clamp(self, min, max).

source

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

Checked integer addition. Returns None if overflow occurred.

source

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

Checked integer subtraction. Returns None if overflow occurred.

source

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

Checked integer multiplication. Returns None if overflow occurred.

source

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

Checked integer division. Returns None if rhs is zero, or the division resulted in overflow.

source

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

Checked euclidian division. Returns None if rhs is zero or self.div_euclid(rhs) would have resulted in overflow.

source

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

Checked integer remainder. Returns None if rhs is zero or the remainder would have resulted in overflow.

source

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

Checked euclidian remainder. Returns None if rhs is zero or self.rem_euclid(rhs) would have resulted in overflow.

source

pub const fn checked_neg(self) -> Option<Self>

Checked integer negation. Returns None if the negation resulted in overflow.

source

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

Checked left bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked right bit shift. Returns None if rhs is greater than or equal to Self::BITS.

source

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

Checked exponentiation. Returns None if the exponentiation resulted in overflow.

source

pub const fn checked_ilog(self, base: Self) -> Option<u32>

Checked logarithm, rounded down. Returns None if self is less than or equal zero, or if base is less than 2.

source

pub const fn checked_ilog2(self) -> Option<u32>

Checked base 2 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

pub const fn checked_ilog10(self) -> Option<u32>

Checked base 10 logarithm, rounded down. Returns None if self is less than or equal to zero.

source

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

Satruating integer addition. The result of the addition is clamped between MIN and MAX.

source

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

Saturating integer subtraction. The result of the subtraction is clamped between MIN and MAX.

source

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

Saturating integer multiplication. The result of the multiplication is clamped between MIN and MAX.

source

pub const fn saturating_pow(self, exp: u32) -> Self

Saturating exponentiation. The result of the exponentiation is clammed between MIN and MAX.

source

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

Wrapping (modular) addition. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) subtraction. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) multiplication. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian division. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) remainder. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) euclidian remainder. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_neg(self) -> Self

Wrapping (modular) negation. An overflowing result is wrapped around the bounds of this integer type.

source

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

Wrapping (modular) left bit shift. The value is left shifted rhs % Self::BITS bits.

source

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

Wrapping (modular) right bit shift. The value is right shifted rhs % Self::BITS bits.

source

pub const fn wrapping_pow(self, exp: u32) -> Self

Wrapping (modular) exponentiation. An overflowing result is wrapped around the bounds of this integer type.

source

pub const fn wrapping_abs(self) -> Self

Wrapping (modular) aboslute value. An overflowing result is wrapped around the bounds of this integer type.

source

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

Calculates self + rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self - rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self * rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self / rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.div_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self % rhs, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self.rem_euclid(rhs), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates -self, returning a tuple of the result and a bool indicating if overflow occurred.

source

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

Calculates self << rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self >> rhs, returning a tuple of the result and a bool indicating if rhs was greater than or equal to Self::BITS.

source

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

Calculates self.pow(exp), returning a tuple of the result and a bool indicating if overflow occurred.

source

pub const fn overflowing_abs(self) -> (Self, bool)

Calculates self.abs(), returning a tuple of the result and a bool indicating if overflow occurred.

source

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

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

source

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

Calculates the quotient of Euclidian division self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < rhs.abs().

In other words, the result is self / rhs, rounded to the integer q such that self >= q * rhs. If self > 0, this is equal to round towards zero. If self < 0, this is equal to rounds towards +/- infinity.

source

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

Calculates the non-negative remainder self (mod rhs).

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

source

pub const fn abs(self) -> Self

Computes the absolute value of this integer.

source

pub const fn abs_diff(self, rhs: Self) -> Aint<u128, WIDTH>

Computes the absolute difference between self and rhs.

This is equivalent to (self - rhs).abs() without the posibility of intermediate overflow.

source

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

Converts a string slice in a given base (radix) to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace will result in an error. Digits are a subset of the following characters depending on the radix.

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

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

source§

impl Aint<i128, 72>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 9]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 9]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 9]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 9]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 9]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 9]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<i128, 80>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 10]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 10]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 10]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 10]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 10]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 10]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<i128, 88>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 11]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 11]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 11]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 11]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 11]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 11]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<i128, 96>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 12]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 12]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 12]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 12]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 12]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 12]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<i128, 104>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 13]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 13]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 13]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 13]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 13]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 13]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<i128, 112>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 14]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 14]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 14]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 14]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 14]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 14]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

source§

impl Aint<i128, 120>

source

pub const fn swap_bytes(self) -> Self

Reverses the byte order of the integer.

source

pub const fn from_be(x: Self) -> Self

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

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

source

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.

source

pub const fn to_be(self) -> Self

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

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

source

pub const fn to_le(self) -> Self

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

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

source

pub const fn from_be_bytes(bytes: [u8; 15]) -> Self

Creates an integer value from its memory representation as a byte array in bit endian.

source

pub const fn from_le_bytes(bytes: [u8; 15]) -> Self

Creates an integer value from its memory representation as a byte array in little endian.

source

pub const fn from_ne_bytes(bytes: [u8; 15]) -> 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.

source

pub const fn to_be_bytes(self) -> [u8; 15]

Return the memory representation of this integer as a byte array in big-endian byte order.

source

pub const fn to_le_bytes(self) -> [u8; 15]

Return the memory representation of this integer as a byte array in little-endian byte order.

source

pub const fn to_ne_bytes(self) -> [u8; 15]

Return 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 likely wants to use to_be_bytes or to_le_bytes, as appropriate instead.

Trait Implementations§

source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Add<&'b Aint<R, WIDTH>> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &'b Aint<R, WIDTH>) -> Self::Output

Performs the + operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Add<&Aint<R, WIDTH>> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the + operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Add<Aint<R, WIDTH>> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Aint<R, WIDTH>) -> Self::Output

Performs the + operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Add for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> AddAssign<T> for Aint<R, WIDTH>
where Self: Add<T, Output = Self>,

source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Binary for Aint<R, WIDTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> BitAnd<&'b Aint<R, WIDTH>> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: &'b Aint<R, WIDTH>) -> Self::Output

Performs the & operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitAnd<&Aint<R, WIDTH>> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the & operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitAnd<Aint<R, WIDTH>> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Aint<R, WIDTH>) -> Self::Output

Performs the & operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitAnd for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the & operator.
source§

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

Performs the & operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> BitAndAssign<T> for Aint<R, WIDTH>
where Self: BitAnd<T, Output = Self>,

source§

fn bitand_assign(&mut self, rhs: T)

Performs the &= operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> BitOr<&'b Aint<R, WIDTH>> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: &'b Aint<R, WIDTH>) -> Self::Output

Performs the | operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitOr<&Aint<R, WIDTH>> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the | operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitOr<Aint<R, WIDTH>> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Aint<R, WIDTH>) -> Self::Output

Performs the | operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitOr for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the | operator.
source§

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

Performs the | operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> BitOrAssign<T> for Aint<R, WIDTH>
where Self: BitOr<T, Output = Self>,

source§

fn bitor_assign(&mut self, rhs: T)

Performs the |= operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> BitXor<&'b Aint<R, WIDTH>> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: &'b Aint<R, WIDTH>) -> Self::Output

Performs the ^ operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitXor<&Aint<R, WIDTH>> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the ^ operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitXor<Aint<R, WIDTH>> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Aint<R, WIDTH>) -> Self::Output

Performs the ^ operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> BitXor for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the ^ operator.
source§

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

Performs the ^ operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> BitXorAssign<T> for Aint<R, WIDTH>
where Self: BitXor<T, Output = Self>,

source§

fn bitxor_assign(&mut self, rhs: T)

Performs the ^= operation. Read more
source§

impl<R: Clone + Sealed, const WIDTH: u32> Clone for Aint<R, WIDTH>

source§

fn clone(&self) -> Aint<R, WIDTH>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R: Debug + Sealed, const WIDTH: u32> Debug for Aint<R, WIDTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<R: Sealed, const WIDTH: u32> Display for Aint<R, WIDTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Div<&'b Aint<R, WIDTH>> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the / operator.
source§

fn div(self, rhs: &'b Aint<R, WIDTH>) -> Self::Output

Performs the / operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Div<&Aint<R, WIDTH>> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the / operator.
source§

fn div(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the / operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Div<Aint<R, WIDTH>> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Aint<R, WIDTH>) -> Self::Output

Performs the / operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Div for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> DivAssign<T> for Aint<R, WIDTH>
where Self: Div<T, Output = Self>,

source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
source§

impl<const WIDTH: u32> From<Aint<i128, WIDTH>> for i128

source§

fn from(value: Aint<i128, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i16, WIDTH>> for i128

source§

fn from(value: Aint<i16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i16, WIDTH>> for i16

source§

fn from(value: Aint<i16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i16, WIDTH>> for i32

source§

fn from(value: Aint<i16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i16, WIDTH>> for i64

source§

fn from(value: Aint<i16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i16, WIDTH>> for isize

source§

fn from(value: Aint<i16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i32, WIDTH>> for i128

source§

fn from(value: Aint<i32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i32, WIDTH>> for i32

source§

fn from(value: Aint<i32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i32, WIDTH>> for i64

source§

fn from(value: Aint<i32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i64, WIDTH>> for i128

source§

fn from(value: Aint<i64, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i64, WIDTH>> for i64

source§

fn from(value: Aint<i64, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i8, WIDTH>> for i128

source§

fn from(value: Aint<i8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i8, WIDTH>> for i16

source§

fn from(value: Aint<i8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i8, WIDTH>> for i32

source§

fn from(value: Aint<i8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i8, WIDTH>> for i64

source§

fn from(value: Aint<i8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i8, WIDTH>> for i8

source§

fn from(value: Aint<i8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<i8, WIDTH>> for isize

source§

fn from(value: Aint<i8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u128, WIDTH>> for i128

source§

fn from(value: Aint<u128, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u128, WIDTH>> for u128

source§

fn from(value: Aint<u128, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for i128

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for i16

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for i32

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for i64

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for isize

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for u128

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for u16

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for u32

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for u64

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u16, WIDTH>> for usize

source§

fn from(value: Aint<u16, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u32, WIDTH>> for i128

source§

fn from(value: Aint<u32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u32, WIDTH>> for i32

source§

fn from(value: Aint<u32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u32, WIDTH>> for i64

source§

fn from(value: Aint<u32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u32, WIDTH>> for u128

source§

fn from(value: Aint<u32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u32, WIDTH>> for u32

source§

fn from(value: Aint<u32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u32, WIDTH>> for u64

source§

fn from(value: Aint<u32, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u64, WIDTH>> for i128

source§

fn from(value: Aint<u64, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u64, WIDTH>> for i64

source§

fn from(value: Aint<u64, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u64, WIDTH>> for u128

source§

fn from(value: Aint<u64, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u64, WIDTH>> for u64

source§

fn from(value: Aint<u64, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl From<Aint<u8, 1>> for bool

source§

fn from(value: Aint<u8, 1>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for i128

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for i16

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for i32

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for i64

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for i8

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for isize

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for u128

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for u16

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for u32

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for u64

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for u8

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<Aint<u8, WIDTH>> for usize

source§

fn from(value: Aint<u8, WIDTH>) -> Self

Converts to this type from the input type.
source§

impl From<bool> for Aint<u8, 1>

source§

fn from(value: bool) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i16> for Aint<i128, WIDTH>

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i16> for Aint<i32, WIDTH>

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i16> for Aint<i64, WIDTH>

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i32> for Aint<i128, WIDTH>

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i32> for Aint<i64, WIDTH>

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i64> for Aint<i128, WIDTH>

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i8> for Aint<i128, WIDTH>

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i8> for Aint<i16, WIDTH>

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i8> for Aint<i32, WIDTH>

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<i8> for Aint<i64, WIDTH>

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u16> for Aint<i128, WIDTH>

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u16> for Aint<i32, WIDTH>

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u16> for Aint<i64, WIDTH>

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u16> for Aint<u128, WIDTH>

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u16> for Aint<u32, WIDTH>

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u16> for Aint<u64, WIDTH>

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u32> for Aint<i128, WIDTH>

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u32> for Aint<i64, WIDTH>

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u32> for Aint<u128, WIDTH>

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u32> for Aint<u64, WIDTH>

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u64> for Aint<i128, WIDTH>

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u64> for Aint<u128, WIDTH>

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u8> for Aint<i128, WIDTH>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u8> for Aint<i16, WIDTH>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u8> for Aint<i32, WIDTH>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u8> for Aint<i64, WIDTH>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u8> for Aint<u128, WIDTH>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u8> for Aint<u16, WIDTH>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u8> for Aint<u32, WIDTH>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<const WIDTH: u32> From<u8> for Aint<u64, WIDTH>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<R: Hash + Sealed, const WIDTH: u32> Hash for Aint<R, WIDTH>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<R: Sealed, const WIDTH: u32> LowerExp for Aint<R, WIDTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<R: Sealed, const WIDTH: u32> LowerHex for Aint<R, WIDTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Mul<&'b Aint<R, WIDTH>> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'b Aint<R, WIDTH>) -> Self::Output

Performs the * operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Mul<&Aint<R, WIDTH>> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the * operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Mul<Aint<R, WIDTH>> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Aint<R, WIDTH>) -> Self::Output

Performs the * operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Mul for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> MulAssign<T> for Aint<R, WIDTH>
where Self: Mul<T, Output = Self>,

source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
source§

impl<R: Sealed + Neg<Output = R>, const WIDTH: u32> Neg for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<R: Sealed + Neg<Output = R>, const WIDTH: u32> Neg for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Not for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Not for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self

Performs the unary ! operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Octal for Aint<R, WIDTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<R: Ord + Sealed, const WIDTH: u32> Ord for Aint<R, WIDTH>

source§

fn cmp(&self, other: &Aint<R, WIDTH>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<R: PartialEq + Sealed, const WIDTH: u32> PartialEq for Aint<R, WIDTH>

source§

fn eq(&self, other: &Aint<R, WIDTH>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<R: PartialOrd + Sealed, const WIDTH: u32> PartialOrd for Aint<R, WIDTH>

source§

fn partial_cmp(&self, other: &Aint<R, WIDTH>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Rem<&'b Aint<R, WIDTH>> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &'b Aint<R, WIDTH>) -> Self::Output

Performs the % operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Rem<&Aint<R, WIDTH>> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the % operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Rem<Aint<R, WIDTH>> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Aint<R, WIDTH>) -> Self::Output

Performs the % operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Rem for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the % operator.
source§

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

Performs the % operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> RemAssign<T> for Aint<R, WIDTH>
where Self: Rem<T, Output = Self>,

source§

fn rem_assign(&mut self, rhs: T)

Performs the %= operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> SaturatingFrom<Aint<R, WIDTH>> for T
where T: SaturatingFrom<R> + Prim,

source§

fn saturating_from(value: Aint<R, WIDTH>) -> Self

source§

impl<F: Prim, R, const WIDTH: u32> SaturatingFrom<F> for Aint<R, WIDTH>
where R: SaturatingFrom<F> + Sealed,

source§

fn saturating_from(value: F) -> Self

source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a i128
where i128: Shl<R, Output = i128>,

§

type Output = i128

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i128

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a i16
where i16: Shl<R, Output = i16>,

§

type Output = i16

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i16

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a i32
where i32: Shl<R, Output = i32>,

§

type Output = i32

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i32

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a i64
where i64: Shl<R, Output = i64>,

§

type Output = i64

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i64

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a i8
where i8: Shl<R, Output = i8>,

§

type Output = i8

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i8

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a isize
where isize: Shl<R, Output = isize>,

§

type Output = isize

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> isize

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a u128
where u128: Shl<R, Output = u128>,

§

type Output = u128

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u128

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a u16
where u16: Shl<R, Output = u16>,

§

type Output = u16

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u16

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a u32
where u32: Shl<R, Output = u32>,

§

type Output = u32

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u32

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a u64
where u64: Shl<R, Output = u64>,

§

type Output = u64

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u64

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a u8
where u8: Shl<R, Output = u8>,

§

type Output = u8

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u8

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b Aint<R, WIDTH>> for &'a usize
where usize: Shl<R, Output = usize>,

§

type Output = usize

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R, WIDTH>) -> usize

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for i128
where i128: Shl<R, Output = i128>,

§

type Output = i128

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for i16
where i16: Shl<R, Output = i16>,

§

type Output = i16

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for i32
where i32: Shl<R, Output = i32>,

§

type Output = i32

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for i64
where i64: Shl<R, Output = i64>,

§

type Output = i64

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for i8
where i8: Shl<R, Output = i8>,

§

type Output = i8

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for isize
where isize: Shl<R, Output = isize>,

§

type Output = isize

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for u128
where u128: Shl<R, Output = u128>,

§

type Output = u128

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for u16
where u16: Shl<R, Output = u16>,

§

type Output = u16

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for u32
where u32: Shl<R, Output = u32>,

§

type Output = u32

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for u64
where u64: Shl<R, Output = u64>,

§

type Output = u64

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for u8
where u8: Shl<R, Output = u8>,

§

type Output = u8

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&Aint<R, WIDTH>> for usize
where usize: Shl<R, Output = usize>,

§

type Output = usize

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> Shl<&'b Aint<R2, WIDTH2>> for &'a Aint<R1, WIDTH1>

§

type Output = Aint<R1, WIDTH1>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b Aint<R2, WIDTH2>) -> Self::Output

Performs the << operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> Shl<&Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>

§

type Output = Aint<R1, WIDTH1>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &Aint<R2, WIDTH2>) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b i128> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b i128) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&i128> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &i128) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b i16> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b i16) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&i16> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &i16) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b i32> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b i32) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&i32> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &i32) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b i64> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b i64) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&i64> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &i64) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b i8> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b i8) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&i8> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &i8) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b isize> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b isize) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&isize> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &isize) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b u128> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b u128) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&u128> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &u128) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b u16> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b u16) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&u16> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &u16) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b u32> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b u32) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&u32> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &u32) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b u64> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b u64) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&u64> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &u64) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b u8> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b u8) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&u8> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &u8) -> Self

Performs the << operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shl<&'b usize> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &'b usize) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<&usize> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: &usize) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &i128
where i128: Shl<R, Output = i128>,

§

type Output = i128

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> i128

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &i16
where i16: Shl<R, Output = i16>,

§

type Output = i16

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> i16

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &i32
where i32: Shl<R, Output = i32>,

§

type Output = i32

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> i32

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &i64
where i64: Shl<R, Output = i64>,

§

type Output = i64

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> i64

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &i8
where i8: Shl<R, Output = i8>,

§

type Output = i8

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> i8

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &isize
where isize: Shl<R, Output = isize>,

§

type Output = isize

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> isize

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &u128
where u128: Shl<R, Output = u128>,

§

type Output = u128

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> u128

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &u16
where u16: Shl<R, Output = u16>,

§

type Output = u16

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> u16

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &u32
where u32: Shl<R, Output = u32>,

§

type Output = u32

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> u32

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &u64
where u64: Shl<R, Output = u64>,

§

type Output = u64

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> u64

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &u8
where u8: Shl<R, Output = u8>,

§

type Output = u8

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> u8

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for &usize
where usize: Shl<R, Output = usize>,

§

type Output = usize

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> usize

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for i128
where i128: Shl<R, Output = i128>,

§

type Output = i128

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for i16
where i16: Shl<R, Output = i16>,

§

type Output = i16

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for i32
where i32: Shl<R, Output = i32>,

§

type Output = i32

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for i64
where i64: Shl<R, Output = i64>,

§

type Output = i64

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for i8
where i8: Shl<R, Output = i8>,

§

type Output = i8

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for isize
where isize: Shl<R, Output = isize>,

§

type Output = isize

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for u128
where u128: Shl<R, Output = u128>,

§

type Output = u128

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for u16
where u16: Shl<R, Output = u16>,

§

type Output = u16

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for u32
where u32: Shl<R, Output = u32>,

§

type Output = u32

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for u64
where u64: Shl<R, Output = u64>,

§

type Output = u64

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for u8
where u8: Shl<R, Output = u8>,

§

type Output = u8

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<Aint<R, WIDTH>> for usize
where usize: Shl<R, Output = usize>,

§

type Output = usize

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R, WIDTH>) -> Self

Performs the << operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> Shl<Aint<R2, WIDTH2>> for &Aint<R1, WIDTH1>

§

type Output = Aint<R1, WIDTH1>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R2, WIDTH2>) -> Self::Output

Performs the << operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> Shl<Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>

§

type Output = Aint<R1, WIDTH1>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: Aint<R2, WIDTH2>) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i128> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i128) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i128> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i128) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i16> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i16) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i16> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i16) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i32> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i32) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i32> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i32) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i64> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i64) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i64> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i64) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i8> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i8) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<i8> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i8) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<isize> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: isize) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<isize> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: isize) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u128> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u128) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u128> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u128) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u16> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u16) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u16> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u16) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u32> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u32> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

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

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u64> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u64) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u64> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u64) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u8> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u8) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<u8> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u8) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<usize> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: usize) -> Self::Output

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shl<usize> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: usize) -> Self

Performs the << operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for i128
where i128: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for i16
where i16: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for i32
where i32: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for i64
where i64: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for i8
where i8: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for isize
where isize: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for u128
where u128: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for u16
where u16: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for u32
where u32: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for u64
where u64: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for u8
where u8: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&Aint<R, WIDTH>> for usize
where usize: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> ShlAssign<&Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>

source§

fn shl_assign(&mut self, rhs: &Aint<R2, WIDTH2>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&i128> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &i128)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&i16> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &i16)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&i32> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &i32)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&i64> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &i64)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&i8> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &i8)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&isize> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &isize)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&u128> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &u128)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&u16> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &u16)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&u32> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &u32)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&u64> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &u64)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&u8> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &u8)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<&usize> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: &usize)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for i128
where i128: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for i16
where i16: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for i32
where i32: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for i64
where i64: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for i8
where i8: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for isize
where isize: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for u128
where u128: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for u16
where u16: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for u32
where u32: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for u64
where u64: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for u8
where u8: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<Aint<R, WIDTH>> for usize
where usize: ShlAssign<R>,

source§

fn shl_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the <<= operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> ShlAssign<Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>

source§

fn shl_assign(&mut self, rhs: Aint<R2, WIDTH2>)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<i128> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: i128)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<i16> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: i16)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<i32> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: i32)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<i64> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: i64)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<i8> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: i8)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<isize> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: isize)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<u128> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: u128)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<u16> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: u16)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<u32> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<u64> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: u64)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<u8> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: u8)

Performs the <<= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShlAssign<usize> for Aint<R, WIDTH>

source§

fn shl_assign(&mut self, rhs: usize)

Performs the <<= operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a i128
where i128: Shr<R, Output = i128>,

§

type Output = i128

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i128

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a i16
where i16: Shr<R, Output = i16>,

§

type Output = i16

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i16

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a i32
where i32: Shr<R, Output = i32>,

§

type Output = i32

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i32

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a i64
where i64: Shr<R, Output = i64>,

§

type Output = i64

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i64

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a i8
where i8: Shr<R, Output = i8>,

§

type Output = i8

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i8

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a isize
where isize: Shr<R, Output = isize>,

§

type Output = isize

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> isize

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a u128
where u128: Shr<R, Output = u128>,

§

type Output = u128

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u128

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a u16
where u16: Shr<R, Output = u16>,

§

type Output = u16

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u16

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a u32
where u32: Shr<R, Output = u32>,

§

type Output = u32

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u32

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a u64
where u64: Shr<R, Output = u64>,

§

type Output = u64

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u64

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a u8
where u8: Shr<R, Output = u8>,

§

type Output = u8

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u8

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b Aint<R, WIDTH>> for &'a usize
where usize: Shr<R, Output = usize>,

§

type Output = usize

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R, WIDTH>) -> usize

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for i128
where i128: Shr<R, Output = i128>,

§

type Output = i128

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for i16
where i16: Shr<R, Output = i16>,

§

type Output = i16

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for i32
where i32: Shr<R, Output = i32>,

§

type Output = i32

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for i64
where i64: Shr<R, Output = i64>,

§

type Output = i64

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for i8
where i8: Shr<R, Output = i8>,

§

type Output = i8

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for isize
where isize: Shr<R, Output = isize>,

§

type Output = isize

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for u128
where u128: Shr<R, Output = u128>,

§

type Output = u128

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for u16
where u16: Shr<R, Output = u16>,

§

type Output = u16

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for u32
where u32: Shr<R, Output = u32>,

§

type Output = u32

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for u64
where u64: Shr<R, Output = u64>,

§

type Output = u64

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for u8
where u8: Shr<R, Output = u8>,

§

type Output = u8

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&Aint<R, WIDTH>> for usize
where usize: Shr<R, Output = usize>,

§

type Output = usize

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> Shr<&'b Aint<R2, WIDTH2>> for &'a Aint<R1, WIDTH1>

§

type Output = Aint<R1, WIDTH1>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b Aint<R2, WIDTH2>) -> Self::Output

Performs the >> operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> Shr<&Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>

§

type Output = Aint<R1, WIDTH1>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &Aint<R2, WIDTH2>) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b i128> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b i128) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&i128> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &i128) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b i16> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b i16) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&i16> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &i16) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b i32> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b i32) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&i32> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &i32) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b i64> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b i64) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&i64> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &i64) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b i8> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b i8) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&i8> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &i8) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b isize> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b isize) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&isize> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &isize) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b u128> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b u128) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&u128> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &u128) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b u16> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b u16) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&u16> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &u16) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b u32> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b u32) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&u32> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &u32) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b u64> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b u64) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&u64> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &u64) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b u8> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b u8) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&u8> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &u8) -> Self

Performs the >> operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Shr<&'b usize> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &'b usize) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<&usize> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: &usize) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &i128
where i128: Shr<R, Output = i128>,

§

type Output = i128

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> i128

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &i16
where i16: Shr<R, Output = i16>,

§

type Output = i16

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> i16

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &i32
where i32: Shr<R, Output = i32>,

§

type Output = i32

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> i32

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &i64
where i64: Shr<R, Output = i64>,

§

type Output = i64

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> i64

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &i8
where i8: Shr<R, Output = i8>,

§

type Output = i8

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> i8

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &isize
where isize: Shr<R, Output = isize>,

§

type Output = isize

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> isize

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &u128
where u128: Shr<R, Output = u128>,

§

type Output = u128

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> u128

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &u16
where u16: Shr<R, Output = u16>,

§

type Output = u16

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> u16

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &u32
where u32: Shr<R, Output = u32>,

§

type Output = u32

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> u32

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &u64
where u64: Shr<R, Output = u64>,

§

type Output = u64

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> u64

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &u8
where u8: Shr<R, Output = u8>,

§

type Output = u8

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> u8

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for &usize
where usize: Shr<R, Output = usize>,

§

type Output = usize

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> usize

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for i128
where i128: Shr<R, Output = i128>,

§

type Output = i128

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for i16
where i16: Shr<R, Output = i16>,

§

type Output = i16

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for i32
where i32: Shr<R, Output = i32>,

§

type Output = i32

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for i64
where i64: Shr<R, Output = i64>,

§

type Output = i64

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for i8
where i8: Shr<R, Output = i8>,

§

type Output = i8

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for isize
where isize: Shr<R, Output = isize>,

§

type Output = isize

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for u128
where u128: Shr<R, Output = u128>,

§

type Output = u128

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for u16
where u16: Shr<R, Output = u16>,

§

type Output = u16

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for u32
where u32: Shr<R, Output = u32>,

§

type Output = u32

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for u64
where u64: Shr<R, Output = u64>,

§

type Output = u64

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for u8
where u8: Shr<R, Output = u8>,

§

type Output = u8

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<Aint<R, WIDTH>> for usize
where usize: Shr<R, Output = usize>,

§

type Output = usize

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R, WIDTH>) -> Self

Performs the >> operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> Shr<Aint<R2, WIDTH2>> for &Aint<R1, WIDTH1>

§

type Output = Aint<R1, WIDTH1>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R2, WIDTH2>) -> Self::Output

Performs the >> operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> Shr<Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>

§

type Output = Aint<R1, WIDTH1>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: Aint<R2, WIDTH2>) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i128> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i128) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i128> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i128) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i16> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i16) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i16> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i16) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i32> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i32) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i32> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i32) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i64> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i64) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i64> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i64) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i8> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i8) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<i8> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i8) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<isize> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: isize) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<isize> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: isize) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u128> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u128) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u128> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u128) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u16> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u16) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u16> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u16) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u32> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u32> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

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

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u64> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u64) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u64> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u64) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u8> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u8) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<u8> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u8) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<usize> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: usize) -> Self::Output

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Shr<usize> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: usize) -> Self

Performs the >> operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for i128
where i128: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for i16
where i16: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for i32
where i32: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for i64
where i64: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for i8
where i8: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for isize
where isize: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for u128
where u128: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for u16
where u16: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for u32
where u32: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for u64
where u64: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for u8
where u8: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&Aint<R, WIDTH>> for usize
where usize: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> ShrAssign<&Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>

source§

fn shr_assign(&mut self, rhs: &Aint<R2, WIDTH2>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&i128> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &i128)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&i16> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &i16)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&i32> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &i32)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&i64> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &i64)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&i8> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &i8)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&isize> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &isize)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&u128> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &u128)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&u16> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &u16)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&u32> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &u32)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&u64> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &u64)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&u8> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &u8)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<&usize> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: &usize)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for i128
where i128: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for i16
where i16: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for i32
where i32: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for i64
where i64: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for i8
where i8: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for isize
where isize: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for u128
where u128: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for u16
where u16: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for u32
where u32: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for u64
where u64: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for u8
where u8: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<Aint<R, WIDTH>> for usize
where usize: ShrAssign<R>,

source§

fn shr_assign(&mut self, rhs: Aint<R, WIDTH>)

Performs the >>= operation. Read more
source§

impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> ShrAssign<Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>

source§

fn shr_assign(&mut self, rhs: Aint<R2, WIDTH2>)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<i128> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: i128)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<i16> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: i16)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<i32> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: i32)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<i64> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: i64)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<i8> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: i8)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<isize> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: isize)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<u128> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: u128)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<u16> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: u16)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<u32> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<u64> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: u64)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<u8> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: u8)

Performs the >>= operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> ShrAssign<usize> for Aint<R, WIDTH>

source§

fn shr_assign(&mut self, rhs: usize)

Performs the >>= operation. Read more
source§

impl<'a, 'b, R: Sealed, const WIDTH: u32> Sub<&'b Aint<R, WIDTH>> for &'a Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &'b Aint<R, WIDTH>) -> Self::Output

Performs the - operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Sub<&Aint<R, WIDTH>> for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Aint<R, WIDTH>) -> Self

Performs the - operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Sub<Aint<R, WIDTH>> for &Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Aint<R, WIDTH>) -> Self::Output

Performs the - operation. Read more
source§

impl<R: Sealed, const WIDTH: u32> Sub for Aint<R, WIDTH>

§

type Output = Aint<R, WIDTH>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<T, R: Sealed, const WIDTH: u32> SubAssign<T> for Aint<R, WIDTH>
where Self: Sub<T, Output = Self>,

source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for i16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for i32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for i64

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for i8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for isize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for u128

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for u16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for u32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for u64

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i128, WIDTH>> for usize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i16, WIDTH>> for i8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i16, WIDTH>> for u128

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i16, WIDTH>> for u16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i16, WIDTH>> for u32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i16, WIDTH>> for u64

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i16, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i16, WIDTH>> for usize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for i16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for i8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for isize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for u128

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for u16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for u32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for u64

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i32, WIDTH>> for usize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for i16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for i32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for i8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for isize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for u128

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for u16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for u32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for u64

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i64, WIDTH>> for usize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i8, WIDTH>> for u128

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i8, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i8, WIDTH>> for u16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i8, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i8, WIDTH>> for u32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i8, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i8, WIDTH>> for u64

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i8, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i8, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i8, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<i8, WIDTH>> for usize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<i8, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for i16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for i32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for i64

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for i8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for isize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for u16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for u32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for u64

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u128, WIDTH>> for usize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u128, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u16, WIDTH>> for i8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u16, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u16, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u32, WIDTH>> for i16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u32, WIDTH>> for i8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u32, WIDTH>> for isize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u32, WIDTH>> for u16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u32, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u32, WIDTH>> for usize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u32, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u64, WIDTH>> for i16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u64, WIDTH>> for i32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u64, WIDTH>> for i8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u64, WIDTH>> for isize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u64, WIDTH>> for u16

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u64, WIDTH>> for u32

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u64, WIDTH>> for u8

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<Aint<u64, WIDTH>> for usize

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: Aint<u64, WIDTH>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<i128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<i32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<i64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<u128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i128> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i16> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i16> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i16> for Aint<u128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i16> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i16> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i16> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i16> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i32> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i32> for Aint<i32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i32> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i32> for Aint<u128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i32> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i32> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i32> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i32> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<i32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<i64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<u128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i64> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i8> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i8> for Aint<u128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i8> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i8> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i8> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<i8> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: i8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<i128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<i32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<i64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<u128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<isize> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: isize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<i128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<i32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<i64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<u128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u128> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u16> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u16> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u16> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u16> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u32> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u32> for Aint<i32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u32> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u32> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u32> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u32> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u64> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u64> for Aint<i32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u64> for Aint<i64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u64> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u64> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u64> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u64> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u64> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u8> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<u8> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<i128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<i16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<i32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<i64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<i8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<u128, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<u16, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<u32, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<u64, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const WIDTH: u32> TryFrom<usize> for Aint<u8, WIDTH>

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<R: Sealed, const WIDTH: u32> UpperExp for Aint<R, WIDTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<R: Sealed, const WIDTH: u32> UpperHex for Aint<R, WIDTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter.
source§

impl<T, R: Sealed, const WIDTH: u32> WrappingFrom<Aint<R, WIDTH>> for T
where T: WrappingFrom<R> + Prim,

source§

fn wrapping_from(value: Aint<R, WIDTH>) -> Self

source§

impl<F: Prim, R, const WIDTH: u32> WrappingFrom<F> for Aint<R, WIDTH>
where R: WrappingFrom<F> + Sealed,

source§

fn wrapping_from(value: F) -> Self

source§

impl<R: Copy + Sealed, const WIDTH: u32> Copy for Aint<R, WIDTH>

source§

impl<R: Eq + Sealed, const WIDTH: u32> Eq for Aint<R, WIDTH>

source§

impl<R: Sealed, const WIDTH: u32> StructuralEq for Aint<R, WIDTH>

source§

impl<R: Sealed, const WIDTH: u32> StructuralPartialEq for Aint<R, WIDTH>

Auto Trait Implementations§

§

impl<R, const WIDTH: u32> RefUnwindSafe for Aint<R, WIDTH>
where R: RefUnwindSafe,

§

impl<R, const WIDTH: u32> Send for Aint<R, WIDTH>

§

impl<R, const WIDTH: u32> Sync for Aint<R, WIDTH>

§

impl<R, const WIDTH: u32> Unpin for Aint<R, WIDTH>

§

impl<R, const WIDTH: u32> UnwindSafe for Aint<R, WIDTH>
where R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, L, R> BitConcat<L, R> for T
where T: Int, L: Int + WrappingInto<T>, R: Int + WrappingInto<T>, <<L as Int>::Width as Width>::Add<<R as Int>::Width>: WidthEq<<T as Int>::Width>,

source§

fn bit_concat(left: L, right: R) -> T

source§

impl<T, L, R> BitSplit<L, R> for T
where T: Int + WrappingInto<L> + WrappingInto<R>, L: Int, R: Int, <<L as Int>::Width as Width>::Add<<R as Int>::Width>: WidthEq<<T as Int>::Width>,

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<F, T> SaturatingInto<T> for F
where T: SaturatingFrom<F>,

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<F, T> WrappingInto<T> for F
where T: WrappingFrom<F>,

source§

fn wrapping_into(self) -> T