Struct libera::all::Integer32

source ·
pub struct Integer32(pub i32);
Available on crate feature numera only.
Expand description

numera A 32-bit integer number, from the set $\Z$, also known as Z32.

The range of valid numeric values is $\lbrack$i32::MIN $\dots$ i32::MAX$\rbrack$. It is equivalent to the i32 primitive.

Tuple Fields§

§0: i32

Implementations§

source§

impl Integer32

source

pub const fn is_even(&self) -> bool

Returns true if this integer is even.

source

pub const fn is_odd(&self) -> bool

Returns true if this integer is odd.

source

pub const fn is_multiple_of(&self, other: &Integer32) -> bool

Returns true if this integer is a multiple of the other.

source

pub const fn is_divisor_of(&self, other: &Integer32) -> bool

Returns true if this integer is a divisor of the other.

source

pub const fn is_coprime(&self, other: &Integer32) -> bool

Returns true if self and other are relative primes, which means they have only 1 as their only common divisor.

Notation

$a \perp b$.

source

pub const fn digits(&self) -> usize

Returns the number of digits in base 10.

source§

impl Integer32

source

pub fn is_prime(&self) -> Option<bool>

Returns Some(true) if this integer is prime, Some(false) if it’s not prime, or None if it can not be determined.

Returns None if this integer can’t be represented as a usize, or as a u32 in no-std.

source

pub const fn gcd(&self, other: &Integer32) -> Integer32

Calculates the Greatest Common Divisor of this integer and other.

source

pub const fn lcm(&self, other: &Integer32) -> Integer32

Calculates the Lowest Common Multiple of this integer and other.

source§

impl Integer32

source

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

Integer addition.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

source

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

Checked addition.

Returns None on overflow.

source

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

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

source

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

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

source

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

Overflowing addition.

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

source§

impl Integer32

Division

Comparison of division functions
Only the quotient:
dividenddivisorfloattrunceuclidfloorceilawayeven
732.33…222322
7-3-2-2-3-2-2-2
-73-2-3-3-2-2-2
-7-3232322
851.6111222
641.5111222
751.25111212
source

pub const fn div_trunc(self, rhs: Integer32) -> Integer32

Truncated division.

Rounds the quotient towards zero, or away from infinity.

Panics

If rhs is 0 or if division results in overflow.

Examples
assert_eq![Z8::new(7).div_trunc(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_trunc(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_trunc(Z8::new(3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_trunc(Z8::new(-3)), Z8::new(2)];

// tie-breaking
assert_eq![Z8::new(8).div_trunc(Z8::new(5)), Z8::new(1)]; // 8/5 = 1.6 => 1
assert_eq![Z8::new(6).div_trunc(Z8::new(4)), Z8::new(1)]; // 6/4 = 1.5 => 1
assert_eq![Z8::new(7).div_trunc(Z8::new(5)), Z8::new(1)]; // 7/5 = 1.4 => 1
source

pub const fn checked_div_trunc(self, rhs: Integer32) -> Option<Integer32>

Returns the checked truncated division.

Rounds the quotient towards zero, or away from infinity.

Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_trunc(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_trunc(Z8::new(-1)), None]; // overflow
source

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

Returns the euclidean division.

Ensures that the remainder is always non-negative and smaller than the divisor.

Panics

If rhs is 0 or if division results in overflow.

Examples
assert_eq![Z8::new(7).div_euclid(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_euclid(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_euclid(Z8::new(3)), Z8::new(-3)];
assert_eq![Z8::new(-7).div_euclid(Z8::new(-3)), Z8::new(3)];

// tie-breaking
assert_eq![Z8::new(8).div_trunc(Z8::new(5)), Z8::new(1)]; // 8/5 = 1.6 => 1
assert_eq![Z8::new(6).div_trunc(Z8::new(4)), Z8::new(1)]; // 6/4 = 1.5 => 1
assert_eq![Z8::new(7).div_trunc(Z8::new(5)), Z8::new(1)]; // 7/5 = 1.4 => 1
source

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

Returns the checked euclidean division.

Ensures that the remainder is always non-negative and smaller than the divisor.

Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_euclid(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_euclid(Z8::new(-1)), None]; // overflow
source

pub const fn div_floor(self, rhs: Integer32) -> Integer32

Returns the floored division

Rounds the quotient towards negative infinity.

Panics

If rhs is 0 or if the division results in overflow.

Notation

$ \left\lfloor \frac{x}{y} \right\rfloor $

Examples
assert_eq![Z8::new(7).div_floor(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_floor(Z8::new(-3)), Z8::new(-3)];
assert_eq![Z8::new(-7).div_floor(Z8::new(3)), Z8::new(-3)];
assert_eq![Z8::new(-7).div_floor(Z8::new(-3)), Z8::new(2)];

// tie-breaking
assert_eq![Z8::new(8).div_trunc(Z8::new(5)), Z8::new(1)]; // 8/5 = 1.6 => 1
assert_eq![Z8::new(6).div_trunc(Z8::new(4)), Z8::new(1)]; // 6/4 = 1.5 => 1
assert_eq![Z8::new(7).div_trunc(Z8::new(5)), Z8::new(1)]; // 7/5 = 1.4 => 1
source

pub const fn checked_div_floor(self, rhs: Integer32) -> Option<Integer32>

Returns the checked floored division.

Rounds the quotient towards negative infinity.

Notation

$ \left\lfloor \frac{x}{y} \right\rfloor $

Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_floor(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_floor(Z8::new(-1)), None]; // overflow
source

pub const fn div_ceil(self, rhs: Integer32) -> Integer32

Returns the ceiled division.

Rounds the quotient towards positive infinity.

Notation

$ \left\lceil \frac{x}{y} \right\rceil $

Examples
assert_eq![Z8::new(7).div_ceil(Z8::new(3)), Z8::new(3)];
assert_eq![Z8::new(7).div_ceil(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_ceil(Z8::new(3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_ceil(Z8::new(-3)), Z8::new(3)];

// tie-breaking
assert_eq![Z8::new(8).div_ceil(Z8::new(5)), Z8::new(2)]; // 8/5 = 1.6 => 2
assert_eq![Z8::new(6).div_ceil(Z8::new(4)), Z8::new(2)]; // 6/4 = 1.5 => 2
assert_eq![Z8::new(7).div_ceil(Z8::new(5)), Z8::new(2)]; // 7/5 = 1.4 => 2
source

pub const fn checked_div_ceil(self, rhs: Integer32) -> Option<Integer32>

Returns the checked ceiled division.

Rounds the quotient towards positive infinity.

Notation

$ \left\lceil \frac{x}{y} \right\rceil $

Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_ceil(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_ceil(Z8::new(-1)), None]; // overflow
source

pub const fn div_half_away(self, rhs: Integer32) -> Integer32

Returns the rounded division half away from 0.

Rounds the quotient to the nearest integer, tie-breaking away from 0 (w).

Panics

If rhs is 0 or if the division results in overflow.

Examples
assert_eq![Z8::new(7).div_half_away(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_half_away(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_half_away(Z8::new(3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_half_away(Z8::new(-3)), Z8::new(2)];

// half tie-breaking
assert_eq![Z8::new(6).div_half_away(Z8::new(4)), Z8::new(2)]; // 6/4 = 1.5 => 2
assert_eq![Z8::new(7).div_half_away(Z8::new(5)), Z8::new(1)]; // 7/5 = 1.25 => 1
source

pub const fn checked_div_half_away(self, rhs: Integer32) -> Option<Integer32>

Returns the checked rounded division half away from 0.

Rounds the quotient to the nearest integer, tie-breaking away from 0 (w).

Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_half_away(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_half_away(Z8::new(-1)), None]; // overflow
source

pub const fn div_half_even(self, rhs: Integer32) -> Integer32

Returns the rounded division half to even.

Rounds the quotient to the nearest integer, tie-breaking to the nearest even number.

This is also known as bankers’ rounding and is often the default rounding method, since it helps eliminate positive/negative bias and bias towards/away from zero (w).

Panics

If rhs is 0 or if the division results in overflow.

Examples
assert_eq![Z8::new(7).div_half_even(Z8::new(3)), Z8::new(2)];
assert_eq![Z8::new(7).div_half_even(Z8::new(-3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_half_even(Z8::new(3)), Z8::new(-2)];
assert_eq![Z8::new(-7).div_half_even(Z8::new(-3)), Z8::new(2)];

// half tie-breaking
assert_eq![Z8::new(6).div_half_even(Z8::new(4)), Z8::new(2)]; // 6/4 = 1.5 => 2
assert_eq![Z8::new(7).div_half_even(Z8::new(5)), Z8::new(2)]; // 7/5 = 1.25 => 2
source

pub const fn checked_div_half_even(self, rhs: Integer32) -> Option<Integer32>

Returns the checked rounded division half to even.

Rounds the quotient to the nearest integer, tie-breaking to the nearest even number.

This is also known as bankers’ rounding and is often the default rounding method, since it helps eliminate positive/negative bias and bias towards/away from zero (w).

Examples
// invalid operands
assert_eq![Z8::new(7).checked_div_half_away(Z8::new(0)), None]; // division by 0
assert_eq![Z8::MIN.checked_div_half_away(Z8::new(-1)), None]; // overflow
source§

impl Integer32

source

pub const fn div_rem(self, rhs: Integer32) -> (Integer32, Integer32)

Alias of div_rem_trunc.

source

pub const fn div_rem_trunc(self, rhs: Integer32) -> (Integer32, Integer32)

Returns the truncated (quotient, remainder).

Panics

If rhs is 0 or if division results in overflow.

assert_eq![Z8::new(7).div_rem_trunc(Z8::new(3)), (Z8::new(2), Z8::new(1))];
assert_eq![Z8::new(7).div_rem_trunc(Z8::new(-3)), (Z8::new(-2), Z8::new(1))];
assert_eq![Z8::new(-7).div_rem_trunc(Z8::new(3)), (Z8::new(-2), Z8::new(-1))];
assert_eq![Z8::new(-7).div_rem_trunc(Z8::new(-3)), (Z8::new(2), Z8::new(-1))];
source

pub const fn div_rem_euclid(self, rhs: Integer32) -> (Integer32, Integer32)

Returns the euclidean (quotient, remainder).

Panics

If rhs is 0 or if division results in overflow.

Examples
assert_eq![Z8::new(7).div_rem_euclid(Z8::new(3)), (Z8::new(2), Z8::new(1))];
assert_eq![Z8::new(7).div_rem_euclid(Z8::new(-3)), (Z8::new(-2), Z8::new(1))];
assert_eq![Z8::new(-7).div_rem_euclid(Z8::new(3)), (Z8::new(-3), Z8::new(2))];
assert_eq![Z8::new(-7).div_rem_euclid(Z8::new(-3)), (Z8::new(3), Z8::new(2))];
source

pub const fn div_rem_ceil(self, rhs: Integer32) -> (Integer32, Integer32)

Returns the ceiled (quotient, remainder).

Panics

If rhs is 0 or if division results in overflow.

Examples
assert_eq![Z8::new(7).div_rem_ceil(Z8::new(3)), (Z8::new(3), Z8::new(-2))];
assert_eq![Z8::new(7).div_rem_ceil(Z8::new(-3)), (Z8::new(-2), Z8::new(1))];
assert_eq![Z8::new(-7).div_rem_ceil(Z8::new(3)), (Z8::new(-2), Z8::new(-1))];
assert_eq![Z8::new(-7).div_rem_ceil(Z8::new(-3)), (Z8::new(3), Z8::new(2))];
source

pub const fn div_rem_floor(self, rhs: Integer32) -> (Integer32, Integer32)

Returns the floored (quotient, remainder).

Panics

If rhs is 0 or if division results in overflow.

Examples
assert_eq![Z8::new(7).div_rem_floor(Z8::new(3)), (Z8::new(2), Z8::new(1))];
assert_eq![Z8::new(7).div_rem_floor(Z8::new(-3)), (Z8::new(-3), Z8::new(-2))];
assert_eq![Z8::new(-7).div_rem_floor(Z8::new(3)), (Z8::new(-3), Z8::new(2))];
assert_eq![Z8::new(-7).div_rem_floor(Z8::new(-3)), (Z8::new(2), Z8::new(-1))];
source§

impl Integer32

source

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

Integer multiplication.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

source

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

Checked integer multiplication.

Returns None on overflow.

source

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

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

source

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

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

source

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

Overflowing multiplication.

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

source§

impl Integer32

source

pub const fn neg(self) -> Integer32

Basic negation. Computes -self.

Panics

Panics in debug, if self == MIN. While in release, it returns MIN, same as wrapping_neg

source

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

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

source

pub const fn saturating_neg(self) -> Integer32

Saturating negation. Computes -self, returning MAX if self == MIN instead of overflowing.

source

pub const fn wrapping_neg(self) -> Integer32

Wrapping negation. Computes -self, returning MIN if self == MIN instead of overflowing.

source

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

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

Returns a tuple of the negated version along with a boolean indicating whether an arithmetic overflow happened. If self == MIN then (MIN, true) is returned.

source§

impl Integer32

source

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

Integer exponentiation.

Raises self to the power of exp

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

source

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

Checked integer exponentiation.

Returns None on overflow.

source

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

Saturating integer exponentiation.

Raises self to the power of exp, saturating at the numeric bounds instead of overflowing.

source

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

Wrapping (modular) integer exponentiation.

Raises self to the power of exp, wrapping around at the boundary of the type.

source

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

Overflowing integer exponentiation.

Raises self to the power of exp,

Returns a tuple of the exponentiation along with a boolean indicating whether an overflow happened.

source§

impl Integer32

source

pub const fn rem_trunc(self, rhs: Integer32) -> Integer32

Returns the truncated remainder operation.

This is the default remainder operation in Rust, C and Java.

It is based on truncated division, rounding the quotient towards zero, meaning the remainder has the same sign as the dividend.

Notation

$ x \mod n $

Examples
use numera::all::Z8;

assert_eq![Z8::new(-5).rem_trunc(Z8::new(2)), Z8::new(-1)];
source

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

Returns the euclidean remainder operation.

This is often used in modular arithmetic, since it always returns a non-negative remainder.

It is based on euclidean division, whih ensures that the same value of x will always result in the same remainder when divided by the same value of y.

Panics

If rhs is 0 or the division results in overflow.

Examples
use numera::all::Z8;

assert_eq![Z8::new(-5).rem_euclid(Z8::new(2)), Z8::new(1)];
source

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

Returns the checked Euclidean remainder operation.

Computes rem_euclid, returning None if rhs == 0 or the division results in overflow.

Examples
use numera::all::Z8;

assert_eq![Z8::new(-5).checked_rem_euclid(Z8::new(2)), Some(Z8::new(1))];
assert_eq![Z8::new(-5).checked_rem_euclid(Z8::new(0)), None];
source

pub const fn rem_floor(self, rhs: Integer32) -> Integer32

Returns the floored remainder operation.

Rounds the quotient towards negative infinity, differing from the truncated division in regard to negative numbers.

This is often used when the quotient represents the number of “groups” of a certain size that can be formed from a given number of items.

Examples
use numera::all::Z8;

// TODO
source§

impl Integer32

source

pub fn is_square(self) -> bool

Returns true if self is a perfect square, meaning the square root of self is an integer.

Returns false otherwise, which includes all negative values.

Algorithm

$$ \text{is\textunderscore square}(n) = \begin{cases} \text{true} & \text{if } \left(\lfloor \sqrt{n} \rfloor\right)^2 = n \cr \text{false} & \text{if } \left(\lfloor \sqrt{n} \rfloor\right)^2 \neq n \end{cases} $$

Examples
use numera::all::Integer32;

assert_eq![Integer32(12).is_square(), false];
assert_eq![Integer32(13).is_square(), false];
assert_eq![Integer32(16).is_square(), true];
assert_eq![Integer32(20).is_square(), false];
assert_eq![Integer32(21).is_square(), false];
source

pub fn sqrt_floor(self) -> Option<Integer32>

Returns the floored integer square root.

Returns None if self is negative.

Algorithm

$$ \left\lfloor \sqrt{x} \right\rfloor = n_{k} $$

Where $n_{k}$ is the result of a sequence of estimates that starts with an initial $n_{0} = x/2$ which is updated using Heron’s method:

$$ n_{i+1} = n_{i} - ( n_{i}^{2} - x) / 2n_{i}, \quad \small\text{for} \quad i = 0, 1, \ldots, k, $$

Where $n_{i}$ is the current estimate, $n_{i+1}$ is the next estimate, $x$ is self, and $k$ is the number of iterations needed to converge to a solution, on the order of the number of bits of self, about $O(\log_2 b)$, which for e.g. 128 bits would be $ ±7 $ iterations.

Hence, the function continues updating the estimate until reaching $n_{k}$, which provides the largest integer less than or equal to the square root of x.

Examples
use numera::all::Integer32;

assert_eq![Integer32(12).sqrt_floor(), Some(Integer32(3))];
assert_eq![Integer32(13).sqrt_floor(), Some(Integer32(3))];
assert_eq![Integer32(16).sqrt_floor(), Some(Integer32(4))];
assert_eq![Integer32(20).sqrt_floor(), Some(Integer32(4))];
assert_eq![Integer32(21).sqrt_floor(), Some(Integer32(4))];
source

pub fn sqrt_ceil(self) -> Option<Integer32>

Returns the ceiled integer square root.

Returns None if self is negative.

Algorithm

$$ \begin{align} \notag \left\lceil \sqrt{x} \thinspace\right\rceil = \begin{cases} n & \text{if } n^2 = x \cr n+1 & \text{if } n^2 < x \end{cases} \cr \notag \small\text{where } n = \lfloor \sqrt{x} \rfloor & \end{align} $$

Examples
use numera::all::Integer32;

assert_eq![Integer32(12).sqrt_ceil(), Some(Integer32(4))];
assert_eq![Integer32(13).sqrt_ceil(), Some(Integer32(4))];
assert_eq![Integer32(16).sqrt_ceil(), Some(Integer32(4))];
assert_eq![Integer32(20).sqrt_ceil(), Some(Integer32(5))];
assert_eq![Integer32(21).sqrt_ceil(), Some(Integer32(5))];
source

pub fn sqrt_round(self) -> Option<Integer32>

Returns the rounded integer square root.

Returns None if self is negative.

Algorithm

$$ \begin{align} \notag \left\lfloor\sqrt{x} \thinspace\right\rceil = \begin{cases} n & \text{if } x - n^2 < (n+1)^2 - x \cr n+1 & \text{if } x - n^2 \geq (n+1)^2 - x \end{cases} \cr \notag \small\text{where } n = \lfloor \sqrt{x} \rfloor & \end{align} $$

Examples
use numera::all::Integer32;

assert_eq![Integer32(12).sqrt_round(), Some(Integer32(3))];
assert_eq![Integer32(13).sqrt_round(), Some(Integer32(4))];
assert_eq![Integer32(16).sqrt_round(), Some(Integer32(4))];
assert_eq![Integer32(20).sqrt_round(), Some(Integer32(4))];
assert_eq![Integer32(21).sqrt_round(), Some(Integer32(5))];
source

pub fn checked_sqrt_floor(self) -> Option<(Integer32, bool)>

Returns the checked floored integer square root, as a tuple containing sqrt_floor and is_square.

Returns None if self is negative.

Examples
use numera::all::Integer32;

assert_eq![Integer32(12).checked_sqrt_floor(), Some((Integer32(3), false))];
assert_eq![Integer32(13).checked_sqrt_floor(), Some((Integer32(3), false))];
assert_eq![Integer32(16).checked_sqrt_floor(), Some((Integer32(4), true))];
assert_eq![Integer32(20).checked_sqrt_floor(), Some((Integer32(4), false))];
assert_eq![Integer32(21).checked_sqrt_floor(), Some((Integer32(4), false))];
source

pub fn checked_sqrt_ceil(self) -> Option<(Integer32, bool)>

Returns the checked ceiled integer square root, as a tuple containing sqrt_ceil and is_square.

Returns None if self is negative.

Examples
use numera::all::Integer32;

assert_eq![Integer32(12).checked_sqrt_ceil(), Some((Integer32(4), false))];
assert_eq![Integer32(13).checked_sqrt_ceil(), Some((Integer32(4), false))];
assert_eq![Integer32(16).checked_sqrt_ceil(), Some((Integer32(4), true))];
assert_eq![Integer32(20).checked_sqrt_ceil(), Some((Integer32(5), false))];
assert_eq![Integer32(21).checked_sqrt_ceil(), Some((Integer32(5), false))];
source

pub fn checked_sqrt_round(self) -> Option<(Integer32, bool)>

Returns the checked rounded integer square root, as a tuple containing sqrt_round and is_square.

Returns None if self is negative.

Examples
use numera::all::Integer32;

assert_eq![Integer32(12).checked_sqrt_round(), Some((Integer32(3), false))];
assert_eq![Integer32(13).checked_sqrt_round(), Some((Integer32(4), false))];
assert_eq![Integer32(16).checked_sqrt_round(), Some((Integer32(4), true))];
assert_eq![Integer32(20).checked_sqrt_round(), Some((Integer32(4), false))];
assert_eq![Integer32(21).checked_sqrt_round(), Some((Integer32(5), false))];
source§

impl Integer32

source

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

Integer subtraction.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

source

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

Checked subtraction.

source

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

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

source

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

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

source

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

Overflowing subtraction.

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

source§

impl Integer32

source

pub const fn new(value: i32) -> Integer32

Returns a new Integer32.

source§

impl Integer32

source

pub fn as_larger(&self) -> Integer64

Returns the current number as the next larger bit-size.

This method is not implemented for the largest available bit-size.

source

pub fn as_larger_or_same(&self) -> Integer64

Returns the current number as the next larger bit-size, or the same if there’s no larger one available.

source

pub fn try_as_larger(&self) -> Result<Integer64, NumeraError>

Tries to return the current number as the next larger bit-size.

Errors

If there’s no larger bit-size available.

source

pub fn as_smaller_or_same(&self) -> Integer

Available on crate feature try_from only.

Returns the current number as the next smaller bit-size, or the same if the value can’t fit in the smaller bit-size, or if there’s no smaller bit-size available.

source

pub fn try_as_smaller(&self) -> Result<Integer16, NumeraError>

Available on crate feature try_from only.

Tries to return the current number as the next smaller bit-size.

Errors

If the value can’t fit in the smaller bit-size, or if there’s no smaller bit-size available.

Trait Implementations§

source§

impl Add<Integer32> for Integer32

source§

fn add(self, rhs: Integer32) -> <Integer32 as Add<Integer32>>::Output

Performs the + operation.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

§

type Output = Integer32

The resulting type after applying the + operator.
source§

impl AddAssign<Integer32> for Integer32

source§

fn add_assign(&mut self, rhs: Integer32)

Performs the += operation.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

source§

impl Bound for Integer32

source§

fn is_lower_bounded(&self) -> bool

Returns true if the number is lower bounded.
source§

fn is_upper_bounded(&self) -> bool

Returns true if the number is upper bounded.
source§

fn lower_bound(&self) -> Option<Integer32>

Returns the lower bound, if any.
source§

fn upper_bound(&self) -> Option<Integer32>

Returns the upper bound, if any.
source§

impl Clone for Integer32

source§

fn clone(&self) -> Integer32

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 ConstLowerBounded for Integer32

source§

const MIN: Integer32 = Self(i32::MIN)

The smallest value that can be represented with this type.
source§

impl ConstNegOne for Integer32

source§

const NEG_ONE: Integer32 = Self(-1)

The additive inverse of the multiplicative identity, -1.
source§

impl ConstOne for Integer32

source§

const ONE: Integer32 = Self(1)

The multiplicative identity, 1.
source§

impl ConstUpperBounded for Integer32

source§

const MAX: Integer32 = Self(i32::MAX)

The largest value that can be represented with this type.
source§

impl ConstZero for Integer32

source§

const ZERO: Integer32 = Self(0)

The additive identity, 0.
source§

impl Count for Integer32

source§

fn is_countable(&self) -> bool

Returns true if the number is countable.
source§

fn is_uncountable(&self) -> bool

Returns false if the number is countable.
source§

impl Countable for Integer32

source§

fn next(&self) -> Result<Integer32, NumeraError>

Returns the next countable value. Read more
source§

fn previous(&self) -> Result<Integer32, NumeraError>

Returns the previous countable value. Read more
source§

impl Debug for Integer32

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Integer32

source§

fn default() -> Integer32

Returns the “default value” for a type. Read more
source§

impl Display for Integer32

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Div<Integer32> for Integer32

source§

fn div(self, rhs: Integer32) -> <Integer32 as Div<Integer32>>::Output

Performs the / operation, using truncated division.

Panics

In debug, on overflow.

In release, it performs two’s complement wrapping.

§

type Output = Integer32

The resulting type after applying the / operator.
source§

impl DivAssign<Integer32> for Integer32

source§

fn div_assign(&mut self, rhs: Integer32)

Performs the /= operation.

Panics

In debug, on overflow.

In release, it performs two’s complement wrapping.

source§

impl From<&Integer16> for Integer32

source§

fn from(f: &Integer16) -> Integer32

Converts to this type from the input type.
source§

impl From<&Integer32> for Integer128

source§

fn from(f: &Integer32) -> Integer128

Converts to this type from the input type.
source§

impl From<&Integer32> for Integer64

source§

fn from(f: &Integer32) -> Integer64

Converts to this type from the input type.
source§

impl From<&Integer32> for IntegerBig

source§

fn from(f: &Integer32) -> IntegerBig

Converts to this type from the input type.
source§

impl From<&Integer32> for Rational128

source§

fn from(f: &Integer32) -> Rational128

Converts to this type from the input type.
source§

impl From<&Integer32> for Rational32

source§

fn from(f: &Integer32) -> Rational32

Converts to this type from the input type.
source§

impl From<&Integer32> for Rational64

source§

fn from(f: &Integer32) -> Rational64

Converts to this type from the input type.
source§

impl From<&Integer32> for i128

source§

fn from(f: &Integer32) -> i128

Converts to this type from the input type.
source§

impl From<&Integer32> for i32

source§

fn from(f: &Integer32) -> i32

Converts to this type from the input type.
source§

impl From<&Integer32> for i64

source§

fn from(f: &Integer32) -> i64

Converts to this type from the input type.
source§

impl From<&Integer8> for Integer32

source§

fn from(f: &Integer8) -> Integer32

Converts to this type from the input type.
source§

impl From<&NegativeInteger16> for Integer32

source§

fn from(f: &NegativeInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&NegativeInteger8> for Integer32

source§

fn from(f: &NegativeInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonNegativeInteger16> for Integer32

source§

fn from(f: &NonNegativeInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonNegativeInteger8> for Integer32

source§

fn from(f: &NonNegativeInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonPositiveInteger16> for Integer32

source§

fn from(f: &NonPositiveInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonPositiveInteger8> for Integer32

source§

fn from(f: &NonPositiveInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonZeroI16> for Integer32

source§

fn from(f: &NonZeroI16) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonZeroI32> for Integer32

source§

fn from(f: &NonZeroI32) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonZeroI8> for Integer32

source§

fn from(f: &NonZeroI8) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonZeroInteger16> for Integer32

source§

fn from(f: &NonZeroInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonZeroInteger32> for Integer32

source§

fn from(f: &NonZeroInteger32) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonZeroInteger8> for Integer32

source§

fn from(f: &NonZeroInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonZeroU16> for Integer32

source§

fn from(f: &NonZeroU16) -> Integer32

Converts to this type from the input type.
source§

impl From<&NonZeroU8> for Integer32

source§

fn from(f: &NonZeroU8) -> Integer32

Converts to this type from the input type.
source§

impl From<&PositiveInteger16> for Integer32

source§

fn from(f: &PositiveInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&PositiveInteger8> for Integer32

source§

fn from(f: &PositiveInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&Prime16> for Integer32

source§

fn from(f: &Prime16) -> Integer32

Converts to this type from the input type.
source§

impl From<&Prime8> for Integer32

source§

fn from(f: &Prime8) -> Integer32

Converts to this type from the input type.
source§

impl From<&i16> for Integer32

source§

fn from(f: &i16) -> Integer32

Converts to this type from the input type.
source§

impl From<&i32> for Integer32

source§

fn from(f: &i32) -> Integer32

Converts to this type from the input type.
source§

impl From<&i8> for Integer32

source§

fn from(f: &i8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut Integer16> for Integer32

source§

fn from(f: &mut Integer16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut Integer32> for Integer128

source§

fn from(f: &mut Integer32) -> Integer128

Converts to this type from the input type.
source§

impl From<&mut Integer32> for Integer64

source§

fn from(f: &mut Integer32) -> Integer64

Converts to this type from the input type.
source§

impl From<&mut Integer32> for IntegerBig

source§

fn from(f: &mut Integer32) -> IntegerBig

Converts to this type from the input type.
source§

impl From<&mut Integer32> for Rational128

source§

fn from(f: &mut Integer32) -> Rational128

Converts to this type from the input type.
source§

impl From<&mut Integer32> for Rational32

source§

fn from(f: &mut Integer32) -> Rational32

Converts to this type from the input type.
source§

impl From<&mut Integer32> for Rational64

source§

fn from(f: &mut Integer32) -> Rational64

Converts to this type from the input type.
source§

impl From<&mut Integer32> for i128

source§

fn from(f: &mut Integer32) -> i128

Converts to this type from the input type.
source§

impl From<&mut Integer32> for i32

source§

fn from(f: &mut Integer32) -> i32

Converts to this type from the input type.
source§

impl From<&mut Integer32> for i64

source§

fn from(f: &mut Integer32) -> i64

Converts to this type from the input type.
source§

impl From<&mut Integer8> for Integer32

source§

fn from(f: &mut Integer8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NegativeInteger16> for Integer32

source§

fn from(f: &mut NegativeInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NegativeInteger8> for Integer32

source§

fn from(f: &mut NegativeInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonNegativeInteger16> for Integer32

source§

fn from(f: &mut NonNegativeInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonNegativeInteger8> for Integer32

source§

fn from(f: &mut NonNegativeInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonPositiveInteger16> for Integer32

source§

fn from(f: &mut NonPositiveInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonPositiveInteger8> for Integer32

source§

fn from(f: &mut NonPositiveInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonZeroI16> for Integer32

source§

fn from(f: &mut NonZeroI16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonZeroI32> for Integer32

source§

fn from(f: &mut NonZeroI32) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonZeroI8> for Integer32

source§

fn from(f: &mut NonZeroI8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonZeroInteger16> for Integer32

source§

fn from(f: &mut NonZeroInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonZeroInteger32> for Integer32

source§

fn from(f: &mut NonZeroInteger32) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonZeroInteger8> for Integer32

source§

fn from(f: &mut NonZeroInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonZeroU16> for Integer32

source§

fn from(f: &mut NonZeroU16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut NonZeroU8> for Integer32

source§

fn from(f: &mut NonZeroU8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut PositiveInteger16> for Integer32

source§

fn from(f: &mut PositiveInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut PositiveInteger8> for Integer32

source§

fn from(f: &mut PositiveInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut Prime16> for Integer32

source§

fn from(f: &mut Prime16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut Prime8> for Integer32

source§

fn from(f: &mut Prime8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut i16> for Integer32

source§

fn from(f: &mut i16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut i32> for Integer32

source§

fn from(f: &mut i32) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut i8> for Integer32

source§

fn from(f: &mut i8) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut u16> for Integer32

source§

fn from(f: &mut u16) -> Integer32

Converts to this type from the input type.
source§

impl From<&mut u8> for Integer32

source§

fn from(f: &mut u8) -> Integer32

Converts to this type from the input type.
source§

impl From<&u16> for Integer32

source§

fn from(f: &u16) -> Integer32

Converts to this type from the input type.
source§

impl From<&u8> for Integer32

source§

fn from(f: &u8) -> Integer32

Converts to this type from the input type.
source§

impl From<Integer16> for Integer32

source§

fn from(f: Integer16) -> Integer32

Converts to this type from the input type.
source§

impl From<Integer32> for Integer

source§

fn from(z: Integer32) -> Integer

Converts to this type from the input type.
source§

impl From<Integer32> for Integer128

source§

fn from(f: Integer32) -> Integer128

Converts to this type from the input type.
source§

impl From<Integer32> for Integer64

source§

fn from(f: Integer32) -> Integer64

Converts to this type from the input type.
source§

impl From<Integer32> for IntegerBig

source§

fn from(f: Integer32) -> IntegerBig

Converts to this type from the input type.
source§

impl From<Integer32> for Rational128

source§

fn from(f: Integer32) -> Rational128

Converts to this type from the input type.
source§

impl From<Integer32> for Rational32

source§

fn from(f: Integer32) -> Rational32

Converts to this type from the input type.
source§

impl From<Integer32> for Rational64

source§

fn from(f: Integer32) -> Rational64

Converts to this type from the input type.
source§

impl From<Integer32> for i128

source§

fn from(f: Integer32) -> i128

Converts to this type from the input type.
source§

impl From<Integer32> for i32

source§

fn from(f: Integer32) -> i32

Converts to this type from the input type.
source§

impl From<Integer32> for i64

source§

fn from(f: Integer32) -> i64

Converts to this type from the input type.
source§

impl From<Integer8> for Integer32

source§

fn from(f: Integer8) -> Integer32

Converts to this type from the input type.
source§

impl From<NegativeInteger16> for Integer32

source§

fn from(f: NegativeInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<NegativeInteger8> for Integer32

source§

fn from(f: NegativeInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<NonNegativeInteger16> for Integer32

source§

fn from(f: NonNegativeInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<NonNegativeInteger8> for Integer32

source§

fn from(f: NonNegativeInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<NonPositiveInteger16> for Integer32

source§

fn from(f: NonPositiveInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<NonPositiveInteger8> for Integer32

source§

fn from(f: NonPositiveInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<NonZeroI16> for Integer32

source§

fn from(f: NonZeroI16) -> Integer32

Converts to this type from the input type.
source§

impl From<NonZeroI32> for Integer32

source§

fn from(f: NonZeroI32) -> Integer32

Converts to this type from the input type.
source§

impl From<NonZeroI8> for Integer32

source§

fn from(f: NonZeroI8) -> Integer32

Converts to this type from the input type.
source§

impl From<NonZeroInteger16> for Integer32

source§

fn from(f: NonZeroInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<NonZeroInteger32> for Integer32

source§

fn from(f: NonZeroInteger32) -> Integer32

Converts to this type from the input type.
source§

impl From<NonZeroInteger8> for Integer32

source§

fn from(f: NonZeroInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<NonZeroU16> for Integer32

source§

fn from(f: NonZeroU16) -> Integer32

Converts to this type from the input type.
source§

impl From<NonZeroU8> for Integer32

source§

fn from(f: NonZeroU8) -> Integer32

Converts to this type from the input type.
source§

impl From<PositiveInteger16> for Integer32

source§

fn from(f: PositiveInteger16) -> Integer32

Converts to this type from the input type.
source§

impl From<PositiveInteger8> for Integer32

source§

fn from(f: PositiveInteger8) -> Integer32

Converts to this type from the input type.
source§

impl From<Prime16> for Integer32

source§

fn from(f: Prime16) -> Integer32

Converts to this type from the input type.
source§

impl From<Prime8> for Integer32

source§

fn from(f: Prime8) -> Integer32

Converts to this type from the input type.
source§

impl From<i16> for Integer32

source§

fn from(f: i16) -> Integer32

Converts to this type from the input type.
source§

impl From<i32> for Integer32

source§

fn from(f: i32) -> Integer32

Converts to this type from the input type.
source§

impl From<i8> for Integer32

source§

fn from(f: i8) -> Integer32

Converts to this type from the input type.
source§

impl From<u16> for Integer32

source§

fn from(f: u16) -> Integer32

Converts to this type from the input type.
source§

impl From<u8> for Integer32

source§

fn from(f: u8) -> Integer32

Converts to this type from the input type.
source§

impl Hash for Integer32

source§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

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 Ident for Integer32

source§

fn can_zero(&self) -> bool

Returns true if the number can represent 0, the additive identity. Read more
source§

fn can_one(&self) -> bool

Returns true if the number can represent 1, the multiplicative identity. Read more
source§

fn can_neg_one(&self) -> bool

Returns true if the number can represent -1, the additive inverse of the multiplicative identity. Read more
source§

fn is_zero(&self) -> bool

Returns true if the current value is 0. the additive identity.
source§

fn is_one(&self) -> bool

Returns true if the current value is 1, the multiplicative identity.
source§

fn is_neg_one(&self) -> bool

Returns true if the current value is -1, the additive inverse of the multiplicative identity.
source§

impl Integers for Integer32

source§

fn integer_is_even(&self) -> bool

Returns true if this integer is even.
source§

fn integer_is_multiple_of(&self, other: &Integer32) -> bool

Returns true if this integer is a multiple of the other.
source§

fn integer_is_prime(&self) -> Option<bool>

Returns Some(true) if this integer is prime, Some(false) if it’s not prime, or None if it can not be determined. Read more
source§

fn integer_gcd(&self, other: &Integer32) -> Option<Integer32>

Calculates the Greatest Common Divisor of this integer and other. Read more
source§

fn integer_lcm(&self, other: &Integer32) -> Option<Integer32>

Calculates the Lowest Common Multiple of this integer and other. Read more
source§

fn integer_digits(&self) -> usize

Returns the number of digits in base 10, without the sign.
source§

fn integer_is_odd(&self) -> bool

Returns true if this integer is odd.
source§

fn integer_is_divisor_of(&self, other: &Self) -> bool

Returns true if this integer is a divisor of the other.
source§

impl LowerBounded for Integer32

source§

fn new_min() -> Integer32

The smallest value that can be represented with this type.
source§

impl Mul<Integer32> for Integer32

§

type Output = Integer32

Performs the * operation.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

source§

fn mul(self, rhs: Integer32) -> <Integer32 as Mul<Integer32>>::Output

Performs the * operation. Read more
source§

impl MulAssign<Integer32> for Integer32

source§

fn mul_assign(&mut self, rhs: Integer32)

Performs the *= operation.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

source§

impl Neg for Integer32

source§

fn neg(self) -> <Integer32 as Neg>::Output

Performs the unary - operation.

§

type Output = Integer32

The resulting type after applying the - operator.
source§

impl NegOne for Integer32

source§

fn new_neg_one() -> Integer32

Returns a new additive inverse of the multiplicative identity, -1.
source§

fn set_neg_one(&mut self)where Self: Sized,

Sets this number to -1.
source§

impl Numbers for Integer32

source§

fn from_inner_repr( value: <Integer32 as Numbers>::InnerRepr ) -> Result<Integer32, NumeraError>

Returns a new Integer32 from the inner representation.

Errors

This function can’t fail.

source§

unsafe fn from_inner_repr_unchecked( value: <Integer32 as Numbers>::InnerRepr ) -> Integer32

Available on crate feature not(safe) only.

Returns a new Integer32 from the inner representation.

Safety

This function is safe.

source§

fn from_innermost_repr( value: <Integer32 as Numbers>::InnermostRepr ) -> Result<Integer32, NumeraError>

Returns a new Integer32 from the innermost representation.

Errors

This function can’t fail.

source§

unsafe fn from_innermost_repr_unchecked( value: <Integer32 as Numbers>::InnermostRepr ) -> Integer32

Available on crate feature not(safe) only.

Returns a new Integer32 from the innermost representation.

Safety
This function is safe.
§

type InnerRepr = i32

The inner primitive representation of the number. Read more
§

type InnermostRepr = i32

The innermost primitive representation of the number. Read more
source§

fn into_inner_repr(self) -> <Integer32 as Numbers>::InnerRepr

Deconstructs the number to its inner representation.
source§

fn into_innermost_repr(self) -> <Integer32 as Numbers>::InnermostRepr

Deconstructs the number to its innermost representation.
source§

fn try_from_inner_repr( inner: impl Into<Self::InnerRepr> ) -> Result<Self, NumeraError>where Self: Sized,

Forms a new number from its converted given inner representation. Read more
source§

impl One for Integer32

source§

fn new_one() -> Integer32

Returns a new multiplicative identity, 1.
source§

fn set_one(&mut self)where Self: Sized,

Sets this number to 1.
source§

impl Ord for Integer32

source§

fn cmp(&self, other: &Integer32) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Integer32> for Integer32

source§

fn eq(&self, other: &Integer32) -> 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 PartialOrd<Integer32> for Integer32

source§

fn partial_cmp(&self, other: &Integer32) -> 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> Product<&'a Integer32> for Integer32

source§

fn product<I>(iter: I) -> Integer32where I: Iterator<Item = &'a Integer32>,

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Product<Integer32> for Integer32

source§

fn product<I>(iter: I) -> Integer32where I: Iterator<Item = Integer32>,

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Rem<Integer32> for Integer32

source§

fn rem(self, rhs: Integer32) -> <Integer32 as Rem<Integer32>>::Output

Performs the % operation, using truncated remainder.

§

type Output = Integer32

The resulting type after applying the % operator.
source§

impl RemAssign<Integer32> for Integer32

source§

fn rem_assign(&mut self, rhs: Integer32)

Performs the %= operation.

source§

impl Sign for Integer32

source§

fn can_negative(&self) -> bool

Returns true if the type can represent negative numbers.
source§

fn can_positive(&self) -> bool

Returns true if the type can represent positive numbers.
source§

fn is_negative(&self) -> bool

Returns true if the value is negative (< 0).
source§

fn is_positive(&self) -> bool

Returns true if the value is positive (> 0).
source§

impl Sub<Integer32> for Integer32

source§

fn sub(self, rhs: Integer32) -> <Integer32 as Sub<Integer32>>::Output

Performs the - operation.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

§

type Output = Integer32

The resulting type after applying the - operator.
source§

impl SubAssign<Integer32> for Integer32

source§

fn sub_assign(&mut self, rhs: Integer32)

Performs the -= operation.

Panics

Panics in debug, on overflow. While in release, it performs two’s complement wrapping.

source§

impl<'a> Sum<&'a Integer32> for Integer32

source§

fn sum<I>(iter: I) -> Integer32where I: Iterator<Item = &'a Integer32>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl Sum<Integer32> for Integer32

source§

fn sum<I>(iter: I) -> Integer32where I: Iterator<Item = Integer32>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl TryFrom<&Integer128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for Integer16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<Integer16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for Integer8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<Integer8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NegativeInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NegativeInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NegativeInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NegativeInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NegativeInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NegativeInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NegativeInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NegativeInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NegativeInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NegativeInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonNegativeInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonNegativeInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonNegativeInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonNegativeInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonNegativeInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonNegativeInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonNegativeInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonNegativeInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonNegativeInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonNegativeInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonPositiveInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonPositiveInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonPositiveInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonPositiveInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonPositiveInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonPositiveInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonPositiveInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonPositiveInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonPositiveInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonPositiveInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroI128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroI128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroI16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroI16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroI32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroI32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroI64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroI64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroI8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroI8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroU128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroU128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroU16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroU16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroU32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroU32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroU64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroU64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for NonZeroU8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<NonZeroU8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for PositiveInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<PositiveInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for PositiveInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<PositiveInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for PositiveInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<PositiveInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for PositiveInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<PositiveInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for PositiveInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<PositiveInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for Rational16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<Rational16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for Rational8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<Rational8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for i16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<i16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for i8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<i8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for u128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<u128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for u16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<u16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for u32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<u32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for u64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<u64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer32> for u8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer32) -> Result<u8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Integer64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Integer64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NegativeInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NegativeInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NegativeInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NegativeInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NegativeInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NegativeInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonNegativeInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonNegativeInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonNegativeInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonNegativeInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonNegativeInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonNegativeInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonPositiveInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonPositiveInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonPositiveInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonPositiveInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonPositiveInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonPositiveInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonZeroI128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonZeroI128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonZeroI64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonZeroI64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonZeroInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonZeroInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonZeroInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonZeroInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonZeroU128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonZeroU128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonZeroU32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonZeroU32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&NonZeroU64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &NonZeroU64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&PositiveInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &PositiveInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&PositiveInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &PositiveInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&PositiveInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &PositiveInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Prime128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Prime128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Prime32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Prime32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&Prime64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &Prime64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&i128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &i128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&i64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &i64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for Integer16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<Integer16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for Integer8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<Integer8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NegativeInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NegativeInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NegativeInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NegativeInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NegativeInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NegativeInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NegativeInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NegativeInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NegativeInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NegativeInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonNegativeInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonNegativeInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonNegativeInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonNegativeInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonNegativeInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonNegativeInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonNegativeInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonNegativeInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonNegativeInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonNegativeInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonPositiveInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonPositiveInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonPositiveInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonPositiveInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonPositiveInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonPositiveInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonPositiveInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonPositiveInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonPositiveInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonPositiveInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroI128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroI128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroI16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroI16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroI32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroI32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroI64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroI64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroI8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroI8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroU128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroU128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroU16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroU16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroU32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroU32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroU64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroU64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for NonZeroU8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<NonZeroU8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for PositiveInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<PositiveInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for PositiveInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<PositiveInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for PositiveInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<PositiveInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for PositiveInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<PositiveInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for PositiveInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<PositiveInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for Rational16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<Rational16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for Rational8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<Rational8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for i16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<i16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for i8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<i8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for u128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<u128, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for u16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<u16, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for u32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<u32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for u64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<u64, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer32> for u8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer32) -> Result<u8, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Integer64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Integer64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NegativeInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NegativeInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NegativeInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NegativeInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NegativeInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NegativeInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonNegativeInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonNegativeInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonNegativeInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonNegativeInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonNegativeInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonNegativeInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonPositiveInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonPositiveInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonPositiveInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonPositiveInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonPositiveInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonPositiveInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonZeroI128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonZeroI128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonZeroI64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonZeroI64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonZeroInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonZeroInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonZeroInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonZeroInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonZeroU128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonZeroU128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonZeroU32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonZeroU32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut NonZeroU64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut NonZeroU64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut PositiveInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut PositiveInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut PositiveInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut PositiveInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut PositiveInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut PositiveInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Prime128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Prime128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Prime32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Prime32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut Prime64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut Prime64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut i128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut i128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut i64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut i64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut u128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut u128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut u32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut u32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&mut u64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &mut u64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&u128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &u128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&u32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &u32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<&u64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: &u64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer> for Integer32

§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from( z: Integer ) -> Result<Integer32, <Integer32 as TryFrom<Integer>>::Error>

Performs the conversion.
source§

impl TryFrom<Integer128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for Integer16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<Integer16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for Integer8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<Integer8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NegativeInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NegativeInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NegativeInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NegativeInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NegativeInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NegativeInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NegativeInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NegativeInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NegativeInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NegativeInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonNegativeInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonNegativeInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonNegativeInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonNegativeInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonNegativeInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonNegativeInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonNegativeInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonNegativeInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonNegativeInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonNegativeInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonPositiveInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonPositiveInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonPositiveInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonPositiveInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonPositiveInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonPositiveInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonPositiveInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonPositiveInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonPositiveInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonPositiveInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroI128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroI128, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroI16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroI16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroI32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroI32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroI64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroI64, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroI8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroI8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroU128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroU128, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroU16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroU16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroU32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroU32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroU64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroU64, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for NonZeroU8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<NonZeroU8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for PositiveInteger128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<PositiveInteger128, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for PositiveInteger16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<PositiveInteger16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for PositiveInteger32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<PositiveInteger32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for PositiveInteger64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<PositiveInteger64, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for PositiveInteger8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<PositiveInteger8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for Rational16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<Rational16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for Rational8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<Rational8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for i16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<i16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for i8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<i8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for u128

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<u128, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for u16

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<u16, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for u32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<u32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for u64

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<u64, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer32> for u8

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer32) -> Result<u8, NumeraError>

Performs the conversion.
source§

impl TryFrom<Integer64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Integer64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NegativeInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NegativeInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NegativeInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NegativeInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NegativeInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NegativeInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonNegativeInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonNegativeInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonNegativeInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonNegativeInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonNegativeInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonNegativeInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonPositiveInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonPositiveInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonPositiveInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonPositiveInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonPositiveInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonPositiveInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonZeroI128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonZeroI128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonZeroI64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonZeroI64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonZeroInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonZeroInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonZeroInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonZeroInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonZeroU128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonZeroU128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonZeroU32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonZeroU32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<NonZeroU64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: NonZeroU64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<PositiveInteger128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: PositiveInteger128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<PositiveInteger32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: PositiveInteger32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<PositiveInteger64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: PositiveInteger64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Prime128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Prime128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Prime32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Prime32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<Prime64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: Prime64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<i128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: i128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<i64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: i64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<u128> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: u128) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<u32> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: u32) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl TryFrom<u64> for Integer32

Available on crate feature try_from only.
§

type Error = NumeraError

The type returned in the event of a conversion error.
source§

fn try_from(f: u64) -> Result<Integer32, NumeraError>

Performs the conversion.
source§

impl UpperBounded for Integer32

source§

fn new_max() -> Integer32

The largest value that can be represented with this type.
source§

impl Zero for Integer32

source§

fn new_zero() -> Integer32

Returns a new additive identity, 0.
source§

fn set_zero(&mut self)where Self: Sized,

Sets this number to 0.
source§

impl Copy for Integer32

source§

impl Eq for Integer32

source§

impl Negative for Integer32

source§

impl Positive for Integer32

source§

impl StructuralEq for Integer32

source§

impl StructuralPartialEq for Integer32

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Also for T

source§

fn also_mut<F>(self, f: F) -> Selfwhere F: FnOnce(&mut Self),

Applies a function which takes the parameter by exclusive reference, and then returns the (possibly) modified owned value. Read more
source§

fn also_ref<F>(self, f: F) -> Selfwhere F: FnOnce(&Self),

Applies a function which takes the parameter by shared reference, and then returns the (possibly) modified owned value. Read more
source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, Res> Apply<Res> for Twhere T: ?Sized,

source§

fn apply<F>(self, f: F) -> Reswhere F: FnOnce(Self) -> Res, Self: Sized,

Apply a function which takes the parameter by value.
source§

fn apply_ref<F>(&self, f: F) -> Reswhere F: FnOnce(&Self) -> Res,

Apply a function which takes the parameter by shared reference.
source§

fn apply_mut<F>(&mut self, f: F) -> Reswhere F: FnOnce(&mut Self) -> Res,

Apply a function which takes the parameter by exclusive reference.
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dstwhere T: Cast<Dst>,

Casts the value.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dstwhere Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

impl<T> DataSize for T

source§

const BYTES: usize = size_of::<Self>()

The size of this type in bytes, rounded up if it’s not a multiple of 8.
source§

const UBITS: usize = Self::UBYTES * 8

The pointer size in bits for the current platform.
source§

const UBYTES: usize = 8usize

The pointer size in bytes for the current platform.
source§

fn pointer_ratio(&self) -> (usize, usize)

Returns the size ratio between UBYTES and BYTES. Read more
source§

fn stack_byte_size(&self) -> usize

Returns the size in bytes of this type, in the stack. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

source§

impl<T, U> Into<U> for Twhere 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.

§

impl<F, T> IntoSample<T> for Fwhere T: FromSample<F>,

§

fn into_sample(self) -> T

source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> ToSample<U> for Twhere U: FromSample<T>,

§

fn to_sample_(self) -> U

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> BitSizeAtLeast<0> for T

source§

impl<T> Bounded for Twhere T: LowerBounded + UpperBounded,

source§

impl<T> ConstBounded for Twhere T: ConstLowerBounded + ConstUpperBounded,

§

impl<S, T> Duplex<S> for Twhere T: FromSample<S> + ToSample<S>,

source§

impl<T, Rhs> NumAssignOps<Rhs> for Twhere T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for Twhere T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

source§

impl<T> Signed for Twhere T: Positive + Negative,