pub struct Int<const N: usize> { /* private fields */ }Expand description
Signed (two’s-complement) fixed-width integer of N little-endian
64-bit limbs.
Implementations§
Source§impl<const N: usize> Int<N>
impl<const N: usize> Int<N>
Sourcepub const BITS: u32
pub const BITS: u32
Bit width (LIMBS * 64). u32 so it composes directly with the
leading_zeros / count_ones u32 surface and matches the
historic named-type BITS constant.
Sourcepub const fn from_limbs(limbs: [u64; N]) -> Self
pub const fn from_limbs(limbs: [u64; N]) -> Self
Constructs from raw little-endian two’s-complement limbs.
Sourcepub const fn is_negative(&self) -> bool
pub const fn is_negative(&self) -> bool
true when the value is strictly negative (top bit set).
Sourcepub const fn is_positive(&self) -> bool
pub const fn is_positive(&self) -> bool
true when the value is strictly positive (non-zero and the
sign bit clear).
Sourcepub const fn wrapping_neg(self) -> Self
pub const fn wrapping_neg(self) -> Self
Two’s-complement wrapping negation (!self + 1). MIN negates
to itself, as with the primitive signed integers.
Sourcepub const fn wrapping_add(self, rhs: Self) -> Self
pub const fn wrapping_add(self, rhs: Self) -> Self
Wrapping addition (modulo 2^BITS). Identical bit pattern to the
unsigned add — two’s-complement makes signed and unsigned
addition the same operation.
Sourcepub const fn wrapping_sub(self, rhs: Self) -> Self
pub const fn wrapping_sub(self, rhs: Self) -> Self
Wrapping subtraction (modulo 2^BITS).
Sourcepub const fn wrapping_mul(self, rhs: Self) -> Self
pub const fn wrapping_mul(self, rhs: Self) -> Self
Wrapping multiplication (modulo 2^BITS). The low N limbs of a
two’s-complement product are independent of the operand signs, so
this is the same truncated schoolbook the unsigned type uses.
Sourcepub const fn checked_add(self, rhs: Self) -> Option<Self>
pub const fn checked_add(self, rhs: Self) -> Option<Self>
Checked signed addition: None on two’s-complement overflow.
Overflow happens only when both operands share a sign and the
result’s sign differs from it. Routes through the add policy’s
checked door to the FUSED single-pass kernel (ripple + overflow
verdict in one traversal) — the previous layered shape
(wrapping_add then three sign reads then an Option rewrap)
measured ≈2× the bare loop at 24 limbs in inter-layer moves.
Sourcepub const fn checked_sub(self, rhs: Self) -> Option<Self>
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
Checked signed subtraction: None on two’s-complement overflow
(the operands’ signs differ and the result takes the subtrahend’s
sign). Routes through the sub policy’s checked door to the fused
single-pass kernel — see Self::checked_add.
Sourcepub fn checked_mul(self, rhs: Self) -> Option<Self>
pub fn checked_mul(self, rhs: Self) -> Option<Self>
Checked signed multiplication: None if the true product does
not fit the signed range. Computed via magnitudes so it reuses
the unsigned overflow check, then re-signs.
Sourcepub const fn wrapping_pow(self, exp: u32) -> Self
pub const fn wrapping_pow(self, exp: u32) -> Self
Wrapping exponentiation by squaring (self^exp modulo 2^BITS).
self^0 == 1. Thin delegator DOWN to the pow policy
(pow_dispatch) on the unsigned reinterpretation: binary
square-and-multiply over the const kernels. The low N limbs of a
power are sign-independent, so reinterpreting as Uint<N> and back
preserves the two’s-complement result.
Sourcepub fn checked_pow(self, exp: u32) -> Option<Self>
pub fn checked_pow(self, exp: u32) -> Option<Self>
Exponentiation by squaring, returning None on signed overflow.
Sourcepub const fn wrapping_sqr(self) -> Self
pub const fn wrapping_sqr(self) -> Self
Wrapping square (self² modulo 2^BITS). Thin delegator DOWN to
the sqr policy (sqr_dispatch) on the unsigned reinterpretation:
half-product squaring via the const kernel. The low N limbs of a
square are sign-independent, so reinterpreting as Uint<N> and back
preserves the two’s-complement result.
Sourcepub const fn wrapping_cube(self) -> Self
pub const fn wrapping_cube(self) -> Self
Wrapping cube (self³ modulo 2^BITS). Thin delegator DOWN to the
cube policy (cube_dispatch) on the unsigned reinterpretation:
sqr then one multiply via the const kernels. The low N limbs are
sign-independent, so reinterpreting as Uint<N> and back preserves
the two’s-complement result.
Sourcepub const fn bit_length(&self) -> u32
pub const fn bit_length(&self) -> u32
MAGNITUDE bit length: 0 for zero, else floor(log2|self|) + 1
— the number of significant bits of the absolute value |self|.
This is a distinct concept from the primitive bit-count methods
(Self::leading_zeros, Self::trailing_zeros,
Self::count_ones, Self::count_zeros), which read the
two’s-complement representation. bit_length ignores the sign:
(-5).bit_length() == 5.bit_length() == 3. It is kept public for
internal normalisation use (root/reciprocal seeds, shift amounts).
At MIN the magnitude is 2^(BITS-1), so
MIN.bit_length() == BITS (one more than MAX.bit_length(),
which is BITS - 1).
Sourcepub const fn leading_zeros(&self) -> u32
pub const fn leading_zeros(&self) -> u32
Leading zero bits of the two’s-complement representation, matching
the primitive iN::leading_zeros contract. A negative value has its
sign bit (the MSB) set, so it has zero leading zeros; a non-negative
value’s leading-zero count is BITS - bit_length (BITS for zero).
MIN is negative, so MIN.leading_zeros() == 0. MAX is the
largest non-negative value (0b0111…1), so MAX.leading_zeros() == 1. Note this is the two’s-complement count, NOT a magnitude
count — contrast Self::bit_length.
Sourcepub const fn unsigned_abs(self) -> Uint<N>
pub const fn unsigned_abs(self) -> Uint<N>
|self| as the unsigned twin. MIN maps to 2^(BITS-1).
Sourcepub fn negate(self) -> Self
pub fn negate(self) -> Self
Two’s-complement negation. Alias of Self::wrapping_neg.
Sourcepub fn div_rem(self, rhs: Self) -> (Self, Self)
pub fn div_rem(self, rhs: Self) -> (Self, Self)
Truncating quotient and remainder (self / rhs, self % rhs) in a
single divmod call. The quotient truncates toward zero and the
remainder takes the sign of the dividend. Routes through the
const-N fast-arm (div_rem_mag_fixed): native u64 idiv at
N == 1, native u128 divide at N == 2, and the dispatching
divmod (Knuth / Burnikel–Ziegler) for wider N. Panics on a zero
divisor.
Sourcepub const fn bit(self, idx: u32) -> bool
pub const fn bit(self, idx: u32) -> bool
true if bit idx of the two’s-complement representation is set.
Sourcepub const fn from_limbs_le(limbs: [u64; N]) -> Self
pub const fn from_limbs_le(limbs: [u64; N]) -> Self
Builds directly from the little-endian u64 limb array. Alias of
Self::from_limbs under the historic from_limbs_le public name.
Sourcepub const fn limbs_le(self) -> [u64; N]
pub const fn limbs_le(self) -> [u64; N]
Returns the little-endian u64 limbs by value. Symmetric with
Self::from_limbs_le.
Sourcepub fn mul_u64(self, n: u64) -> Self
pub fn mul_u64(self, n: u64) -> Self
self · (n as Self) with the sign of self, panicking on
overflow (the default-form contract). Computes the n-by-1-word
product (the same limb recurrence as mul_schoolbook_into) and
rejects a non-zero top carry.
Sourcepub fn to_i128_checked(self) -> Option<i128>
pub fn to_i128_checked(self) -> Option<i128>
Exact i128 value, or None if it does not fit.
Sourcepub fn to_u128_checked(self) -> Option<u128>
pub fn to_u128_checked(self) -> Option<u128>
Exact u128 value, or None if negative / too large.
Sourcepub fn to_f32(self) -> f32
pub fn to_f32(self) -> f32
Approximate f32 value of self (round-to-nearest; lossy above
24 significant bits). Routes through the f64 accumulation to keep
one summation path.
Sourcepub fn from_f64(v: f64) -> Self
pub fn from_f64(v: f64) -> Self
Builds from an f64, truncating toward zero. Saturates to
MIN / MAX on out-of-range; non-finite maps to ZERO.
Sourcepub const fn from_str_radix(s: &str, radix: u32) -> Result<Self, ()>
pub const fn from_str_radix(s: &str, radix: u32) -> Result<Self, ()>
Parses a signed decimal magnitude from s. Accepts an optional
leading -, then ASCII digits. Only radix == 10 is supported;
any other value returns Err(()).
Sourcepub const fn pow(self, exp: u32) -> Self
pub const fn pow(self, exp: u32) -> Self
Integer power: self^exp (wrapping on overflow). Alias of
Self::wrapping_pow under the pow name.
Sourcepub fn isqrt(self) -> Self
pub fn isqrt(self) -> Self
Integer square root of the magnitude (floor(sqrt(|self|))),
returned non-negative. Delegates to the unsigned sibling which
routes through isqrt_dispatch.
Sourcepub fn sqr(self) -> Self
pub fn sqr(self) -> Self
Integer square: self² modulo 2^BITS. Routes through the sqr
policy (sqr_dispatch) on the unsigned reinterpretation, then
reinterprets back as signed. Equivalent to wrapping_sqr.
Sourcepub fn cube(self) -> Self
pub fn cube(self) -> Self
Integer cube: self³ modulo 2^BITS. Routes through the cube
policy (cube_dispatch) on the unsigned reinterpretation, then
reinterprets back as signed. Equivalent to wrapping_cube.
Sourcepub fn icbrt(self) -> Self
pub fn icbrt(self) -> Self
Integer cube root of the magnitude (floor(cbrt(|self|))),
returned non-negative. Delegates to the unsigned sibling which
routes through icbrt_dispatch.
Sourcepub const fn cast_unsigned(self) -> Uint<N>
pub const fn cast_unsigned(self) -> Uint<N>
Reinterprets the bit pattern as the unsigned sibling.
Sourcepub fn as_f64(self) -> f64
pub fn as_f64(self) -> f64
Approximate f64 value. Alias of Self::to_f64, matching the
macro’s as_f64 name.
Sourcepub const fn count_ones(self) -> u32
pub const fn count_ones(self) -> u32
Count of set bits across the two’s-complement representation,
matching the primitive iN::count_ones contract — the limbs are
read as stored, so negative values count their sign-extended
one-bits. (-1).count_ones() == BITS (all-ones), and
MIN.count_ones() == 1 (only the sign bit). This is a
two’s-complement count, not a magnitude count.
Sourcepub const fn count_zeros(self) -> u32
pub const fn count_zeros(self) -> u32
Count of clear bits across the two’s-complement representation,
matching the primitive iN::count_zeros contract
(BITS - count_ones). (-1).count_zeros() == 0 and
MIN.count_zeros() == BITS - 1.
Sourcepub const fn trailing_zeros(self) -> u32
pub const fn trailing_zeros(self) -> u32
Number of trailing zero bits of the two’s-complement
representation, matching the primitive iN::trailing_zeros
contract; BITS for zero. MIN has only its sign bit set, so
MIN.trailing_zeros() == BITS - 1. This reads the stored limbs,
not the magnitude — contrast Self::bit_length.
Sourcepub const fn checked_neg(self) -> Option<Self>
pub const fn checked_neg(self) -> Option<Self>
Checked negation: None exactly at MIN (whose negation
overflows the signed range).
Sourcepub const fn checked_div(self, rhs: Self) -> Option<Self>
pub const fn checked_div(self, rhs: Self) -> Option<Self>
Checked division: None on a zero divisor.
Sourcepub const fn checked_rem(self, rhs: Self) -> Option<Self>
pub const fn checked_rem(self, rhs: Self) -> Option<Self>
Checked remainder: None on a zero divisor, and None for the
MIN % -1 overflow case (the paired division MIN / -1 overflows
the signed range), matching the primitive integer contract.
Sourcepub const fn div_euclid(self, rhs: Self) -> Self
pub const fn div_euclid(self, rhs: Self) -> Self
Euclidean division: the quotient that leaves a non-negative remainder.
Sourcepub const fn rem_euclid(self, rhs: Self) -> Self
pub const fn rem_euclid(self, rhs: Self) -> Self
Euclidean remainder — always non-negative.
Sourcepub const fn overflowing_add(self, rhs: Self) -> (Self, bool)
pub const fn overflowing_add(self, rhs: Self) -> (Self, bool)
Wrapping addition paired with the two’s-complement overflow flag.
Sourcepub const fn overflowing_sub(self, rhs: Self) -> (Self, bool)
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool)
Wrapping subtraction paired with the two’s-complement overflow flag.
Sourcepub const fn overflowing_neg(self) -> (Self, bool)
pub const fn overflowing_neg(self) -> (Self, bool)
Wrapping negation paired with the overflow flag (true only at
MIN).
Sourcepub const fn overflowing_rem(self, rhs: Self) -> (Self, bool)
pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool)
Wrapping remainder paired with an overflow flag. The flag is true
only for MIN % -1 (whose paired division overflows the signed
range), in which case the remainder is 0; otherwise false.
Sourcepub const fn saturating_add(self, rhs: Self) -> Self
pub const fn saturating_add(self, rhs: Self) -> Self
Saturating addition: clamps to MIN / MAX on overflow.
Sourcepub const fn saturating_sub(self, rhs: Self) -> Self
pub const fn saturating_sub(self, rhs: Self) -> Self
Saturating subtraction: clamps to MIN / MAX on overflow.
Sourcepub const fn saturating_neg(self) -> Self
pub const fn saturating_neg(self) -> Self
Saturating negation: MIN saturates to MAX.
Sourcepub fn rotate_left(self, n: u32) -> Self
pub fn rotate_left(self, n: u32) -> Self
Rotates the bits left by n (modulo BITS).
Sourcepub fn rotate_right(self, n: u32) -> Self
pub fn rotate_right(self, n: u32) -> Self
Rotates the bits right by n (modulo BITS).
Sourcepub const fn wrapping_div(self, rhs: Self) -> Self
pub const fn wrapping_div(self, rhs: Self) -> Self
Truncating division toward zero. Panics on a zero divisor.
Matches the macro’s wrapping_div (single-limb-aware
div_rem, not the dispatching div_rem).
Sourcepub const fn wrapping_rem(self, rhs: Self) -> Self
pub const fn wrapping_rem(self, rhs: Self) -> Self
Truncating remainder; result carries the sign of self. Panics
on a zero divisor. Matches the macro’s wrapping_rem.
Trait Implementations§
impl<const N: usize> Copy for Int<N>
impl<const N: usize> Eq for Int<N>
Source§impl<const N: usize> Ord for Int<N>
impl<const N: usize> Ord for Int<N>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd<Int<1>> for i64
impl PartialOrd<Int<1>> for i64
Source§impl PartialOrd<Int<2>> for i128
impl PartialOrd<Int<2>> for i128
Source§impl<const N: usize, const M: usize> PartialOrd<Int<M>> for Int<N>
impl<const N: usize, const M: usize> PartialOrd<Int<M>> for Int<N>
Source§impl PartialOrd<i64> for Int<1>
impl PartialOrd<i64> for Int<1>
Source§impl PartialOrd<i128> for Int<2>
impl PartialOrd<i128> for Int<2>
Source§impl WidthLE<Int<1>> for Int<1>
impl WidthLE<Int<1>> for Int<1>
Source§fn widen_into(self) -> Int<1>
fn widen_into(self) -> Int<1>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<2>> for Int<2>
impl WidthLE<Int<2>> for Int<2>
Source§fn widen_into(self) -> Int<2>
fn widen_into(self) -> Int<2>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<2>> for i32
impl WidthLE<Int<2>> for i32
Source§fn widen_into(self) -> Int<2>
fn widen_into(self) -> Int<2>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<2>> for i64
impl WidthLE<Int<2>> for i64
Source§fn widen_into(self) -> Int<2>
fn widen_into(self) -> Int<2>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<2>> for Int<1>
impl WidthLE<Int<2>> for Int<1>
Source§fn widen_into(self) -> Int<2>
fn widen_into(self) -> Int<2>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<3>> for Int<3>
impl WidthLE<Int<3>> for Int<3>
Source§fn widen_into(self) -> Int<3>
fn widen_into(self) -> Int<3>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<3>> for i32
impl WidthLE<Int<3>> for i32
Source§fn widen_into(self) -> Int<3>
fn widen_into(self) -> Int<3>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<3>> for i64
impl WidthLE<Int<3>> for i64
Source§fn widen_into(self) -> Int<3>
fn widen_into(self) -> Int<3>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<3>> for i128
impl WidthLE<Int<3>> for i128
Source§fn widen_into(self) -> Int<3>
fn widen_into(self) -> Int<3>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<3>> for Int<2>
impl WidthLE<Int<3>> for Int<2>
Source§fn widen_into(self) -> Int<3>
fn widen_into(self) -> Int<3>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<3>> for Int<1>
impl WidthLE<Int<3>> for Int<1>
Source§fn widen_into(self) -> Int<3>
fn widen_into(self) -> Int<3>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<4>> for Int<4>
impl WidthLE<Int<4>> for Int<4>
Source§fn widen_into(self) -> Int<4>
fn widen_into(self) -> Int<4>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<4>> for i32
impl WidthLE<Int<4>> for i32
Source§fn widen_into(self) -> Int<4>
fn widen_into(self) -> Int<4>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<4>> for i64
impl WidthLE<Int<4>> for i64
Source§fn widen_into(self) -> Int<4>
fn widen_into(self) -> Int<4>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<4>> for i128
impl WidthLE<Int<4>> for i128
Source§fn widen_into(self) -> Int<4>
fn widen_into(self) -> Int<4>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<4>> for Int<2>
impl WidthLE<Int<4>> for Int<2>
Source§fn widen_into(self) -> Int<4>
fn widen_into(self) -> Int<4>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<4>> for Int<1>
impl WidthLE<Int<4>> for Int<1>
Source§fn widen_into(self) -> Int<4>
fn widen_into(self) -> Int<4>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<4>> for Int<3>
impl WidthLE<Int<4>> for Int<3>
Source§fn widen_into(self) -> Int<4>
fn widen_into(self) -> Int<4>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<6>> for Int<6>
impl WidthLE<Int<6>> for Int<6>
Source§fn widen_into(self) -> Int<6>
fn widen_into(self) -> Int<6>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<6>> for i32
impl WidthLE<Int<6>> for i32
Source§fn widen_into(self) -> Int<6>
fn widen_into(self) -> Int<6>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<6>> for i64
impl WidthLE<Int<6>> for i64
Source§fn widen_into(self) -> Int<6>
fn widen_into(self) -> Int<6>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<6>> for i128
impl WidthLE<Int<6>> for i128
Source§fn widen_into(self) -> Int<6>
fn widen_into(self) -> Int<6>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<6>> for Int<2>
impl WidthLE<Int<6>> for Int<2>
Source§fn widen_into(self) -> Int<6>
fn widen_into(self) -> Int<6>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<6>> for Int<1>
impl WidthLE<Int<6>> for Int<1>
Source§fn widen_into(self) -> Int<6>
fn widen_into(self) -> Int<6>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<6>> for Int<3>
impl WidthLE<Int<6>> for Int<3>
Source§fn widen_into(self) -> Int<6>
fn widen_into(self) -> Int<6>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<6>> for Int<4>
impl WidthLE<Int<6>> for Int<4>
Source§fn widen_into(self) -> Int<6>
fn widen_into(self) -> Int<6>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for Int<8>
impl WidthLE<Int<8>> for Int<8>
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for i32
impl WidthLE<Int<8>> for i32
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for i64
impl WidthLE<Int<8>> for i64
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for i128
impl WidthLE<Int<8>> for i128
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for Int<2>
impl WidthLE<Int<8>> for Int<2>
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for Int<1>
impl WidthLE<Int<8>> for Int<1>
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for Int<3>
impl WidthLE<Int<8>> for Int<3>
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for Int<4>
impl WidthLE<Int<8>> for Int<4>
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<8>> for Int<6>
impl WidthLE<Int<8>> for Int<6>
Source§fn widen_into(self) -> Int<8>
fn widen_into(self) -> Int<8>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for Int<12>
impl WidthLE<Int<12>> for Int<12>
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for i32
impl WidthLE<Int<12>> for i32
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for i64
impl WidthLE<Int<12>> for i64
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for i128
impl WidthLE<Int<12>> for i128
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for Int<2>
impl WidthLE<Int<12>> for Int<2>
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for Int<1>
impl WidthLE<Int<12>> for Int<1>
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for Int<3>
impl WidthLE<Int<12>> for Int<3>
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for Int<4>
impl WidthLE<Int<12>> for Int<4>
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for Int<6>
impl WidthLE<Int<12>> for Int<6>
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<12>> for Int<8>
impl WidthLE<Int<12>> for Int<8>
Source§fn widen_into(self) -> Int<12>
fn widen_into(self) -> Int<12>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for Int<16>
impl WidthLE<Int<16>> for Int<16>
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for i32
impl WidthLE<Int<16>> for i32
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for i64
impl WidthLE<Int<16>> for i64
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for i128
impl WidthLE<Int<16>> for i128
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for Int<2>
impl WidthLE<Int<16>> for Int<2>
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for Int<1>
impl WidthLE<Int<16>> for Int<1>
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for Int<3>
impl WidthLE<Int<16>> for Int<3>
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for Int<4>
impl WidthLE<Int<16>> for Int<4>
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for Int<6>
impl WidthLE<Int<16>> for Int<6>
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for Int<8>
impl WidthLE<Int<16>> for Int<8>
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<16>> for Int<12>
impl WidthLE<Int<16>> for Int<12>
Source§fn widen_into(self) -> Int<16>
fn widen_into(self) -> Int<16>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<24>
impl WidthLE<Int<24>> for Int<24>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for i32
impl WidthLE<Int<24>> for i32
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for i64
impl WidthLE<Int<24>> for i64
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for i128
impl WidthLE<Int<24>> for i128
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<2>
impl WidthLE<Int<24>> for Int<2>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<1>
impl WidthLE<Int<24>> for Int<1>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<3>
impl WidthLE<Int<24>> for Int<3>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<4>
impl WidthLE<Int<24>> for Int<4>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<6>
impl WidthLE<Int<24>> for Int<6>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<8>
impl WidthLE<Int<24>> for Int<8>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<12>
impl WidthLE<Int<24>> for Int<12>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<24>> for Int<16>
impl WidthLE<Int<24>> for Int<16>
Source§fn widen_into(self) -> Int<24>
fn widen_into(self) -> Int<24>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<32>
impl WidthLE<Int<32>> for Int<32>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for i32
impl WidthLE<Int<32>> for i32
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for i64
impl WidthLE<Int<32>> for i64
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for i128
impl WidthLE<Int<32>> for i128
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<2>
impl WidthLE<Int<32>> for Int<2>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<1>
impl WidthLE<Int<32>> for Int<1>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<3>
impl WidthLE<Int<32>> for Int<3>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<4>
impl WidthLE<Int<32>> for Int<4>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<6>
impl WidthLE<Int<32>> for Int<6>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<8>
impl WidthLE<Int<32>> for Int<8>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<12>
impl WidthLE<Int<32>> for Int<12>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<16>
impl WidthLE<Int<32>> for Int<16>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<32>> for Int<24>
impl WidthLE<Int<32>> for Int<24>
Source§fn widen_into(self) -> Int<32>
fn widen_into(self) -> Int<32>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<48>
impl WidthLE<Int<48>> for Int<48>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for i32
impl WidthLE<Int<48>> for i32
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for i64
impl WidthLE<Int<48>> for i64
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for i128
impl WidthLE<Int<48>> for i128
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<2>
impl WidthLE<Int<48>> for Int<2>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<1>
impl WidthLE<Int<48>> for Int<1>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<3>
impl WidthLE<Int<48>> for Int<3>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<4>
impl WidthLE<Int<48>> for Int<4>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<6>
impl WidthLE<Int<48>> for Int<6>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<8>
impl WidthLE<Int<48>> for Int<8>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<12>
impl WidthLE<Int<48>> for Int<12>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<16>
impl WidthLE<Int<48>> for Int<16>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<24>
impl WidthLE<Int<48>> for Int<24>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<48>> for Int<32>
impl WidthLE<Int<48>> for Int<32>
Source§fn widen_into(self) -> Int<48>
fn widen_into(self) -> Int<48>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<64>
impl WidthLE<Int<64>> for Int<64>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for i32
impl WidthLE<Int<64>> for i32
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for i64
impl WidthLE<Int<64>> for i64
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for i128
impl WidthLE<Int<64>> for i128
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<2>
impl WidthLE<Int<64>> for Int<2>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<1>
impl WidthLE<Int<64>> for Int<1>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<3>
impl WidthLE<Int<64>> for Int<3>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<4>
impl WidthLE<Int<64>> for Int<4>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<6>
impl WidthLE<Int<64>> for Int<6>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<8>
impl WidthLE<Int<64>> for Int<8>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<12>
impl WidthLE<Int<64>> for Int<12>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<16>
impl WidthLE<Int<64>> for Int<16>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.Source§impl WidthLE<Int<64>> for Int<24>
impl WidthLE<Int<64>> for Int<24>
Source§fn widen_into(self) -> Int<64>
fn widen_into(self) -> Int<64>
self to the Target storage type. Lossless by
construction — Target’s range strictly covers Self’s.