Integer

Struct Integer 

Source
pub struct Integer {
    pub val: Integer,
}

Fields§

§val: Integer

Trait Implementations§

Source§

impl<'a> Add<&'a Integer> for Integer

Source§

type Output = Integer

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, B> Add<B> for &'a Integer
where Integer: Add<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the + operator.
Source§

fn add(self, rhs: B) -> Self::Output

Performs the + operation. Read more
Source§

impl<B> Add<B> for Integer
where Integer: Add<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the + operator.
Source§

fn add(self, rhs: B) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<Integer> for &'a Integer

Source§

type Output = Integer

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Integer) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add for &'a Integer

Source§

type Output = Integer

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Integer) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Integer

Source§

type Output = Integer

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Integer) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> AddAssign<&'a Integer> for Integer

Source§

fn add_assign(&mut self, rhs: &Self)

Performs the += operation. Read more
Source§

impl<B> AddAssign<B> for Integer
where Integer: AddAssign<B>,

Source§

fn add_assign(&mut self, rhs: B)

Performs the += operation. Read more
Source§

impl AddAssign for Integer

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl ArchimedeanDiv for Integer

Source§

fn embed_nat<N: Natural>(n: N) -> Self

Maps a natural number into this structure preserving addition and using the relevant canonical representation Read more
Source§

fn div_arch(self, rhs: Self) -> Self

the unique integer n such that n*rhs <= self and (n+1)*rhs > self
Source§

fn rem_arch(self, rhs: Self) -> Self

the remaining difference after dividing by rhs (ie. self - self.div_arch(rhs)*rhs)
Source§

fn div_alg_arch(self, rhs: Self) -> (Self, Self)

Divides self by rhs with remainder using the archimdean property Read more
Source§

impl Bezout for Integer

Source§

fn bezout_with_gcd(self, rhs: Self) -> (Self, Self, Self)

Computes the GCD and the bezout coefficients in one function call
Source§

fn bezout_coefficients(self, rhs: Self) -> (Self, Self)

Bezout coefficients of a pair of elements Read more
Source§

impl CheckedAdd for Integer

Source§

fn checked_add(&self, v: &Self) -> Option<Self>

Adds two numbers, checking for overflow. If overflow happens, None is returned.
Source§

impl CheckedDiv for Integer

Source§

fn checked_div(&self, v: &Self) -> Option<Self>

Divides two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned.
Source§

impl CheckedMul for Integer

Source§

fn checked_mul(&self, v: &Self) -> Option<Self>

Multiplies two numbers, checking for underflow or overflow. If underflow or overflow happens, None is returned.
Source§

impl CheckedNeg for Integer

Source§

fn checked_neg(&self) -> Option<Self>

Negates a number, returning None for results that can’t be represented, like signed MIN values that can’t be positive, or non-zero unsigned values that can’t be negative. Read more
Source§

impl CheckedRem for Integer

Source§

fn checked_rem(&self, v: &Self) -> Option<Self>

Finds the remainder of dividing two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned. Read more
Source§

impl CheckedShl for Integer

Source§

fn checked_shl(&self, v: u32) -> Option<Self>

Checked shift left. Computes self << rhs, returning None if rhs is larger than or equal to the number of bits in self. Read more
Source§

impl CheckedShr for Integer

Source§

fn checked_shr(&self, v: u32) -> Option<Self>

Checked shift right. Computes self >> rhs, returning None if rhs is larger than or equal to the number of bits in self. Read more
Source§

impl CheckedSub for Integer

Source§

fn checked_sub(&self, v: &Self) -> Option<Self>

Subtracts two numbers, checking for underflow. If underflow happens, None is returned.
Source§

impl Clone for Integer

Source§

fn clone(&self) -> Integer

Returns a duplicate 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 ComplexSubset for Integer

Source§

type Real = Float

Source§

type Natural = Integer

Source§

type Integer = Integer

Source§

fn as_real(self) -> Self::Real

Converts self to a real number, discarding any imaginary component, if complex.
Source§

fn as_natural(self) -> Self::Natural

Converts self to a natural number, truncating when necessary.
Source§

fn as_integer(self) -> Self::Integer

Converts self to an integer, truncating when necessary.
Source§

fn floor(self) -> Self

Rounds the real and imaginary components of self to the closest integer downward
Source§

fn ceil(self) -> Self

Rounds the real and imaginary components of self to the closest integer upward
Source§

fn round(self) -> Self

Rounds the real and imaginary components of self to the closest integer
Source§

fn trunc(self) -> Self

Rounds the real and imaginary components of self by removing the factional parts
Source§

fn fract(self) -> Self

Removes the integral parts of the real and imaginary components of self
Source§

fn im(self) -> Self

Sets the real component of self to 0
Source§

fn re(self) -> Self

Sets the imaginary component of self to 0
Source§

fn conj(self) -> Self

The complex conjugate of self
Source§

fn modulus_sqrd(self) -> Self

The square of the complex absolute value of self Read more
Source§

fn modulus(self) -> Self::Real

The complex absolute value of self Read more
Source§

impl Debug for Integer

Source§

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

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

impl Display for Integer

Source§

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

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

impl<'a> Div<&'a Integer> for Integer

Source§

type Output = Integer

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, B> Div<B> for &'a Integer
where Integer: Div<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the / operator.
Source§

fn div(self, rhs: B) -> Self::Output

Performs the / operation. Read more
Source§

impl<B> Div<B> for Integer
where Integer: Div<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the / operator.
Source§

fn div(self, rhs: B) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> Div<Integer> for &'a Integer

Source§

type Output = Integer

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Integer) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> Div for &'a Integer

Source§

type Output = Integer

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'a Integer) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for Integer

Source§

type Output = Integer

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Integer) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> DivAssign<&'a Integer> for Integer

Source§

fn div_assign(&mut self, rhs: &Self)

Performs the /= operation. Read more
Source§

impl<B> DivAssign<B> for Integer
where Integer: DivAssign<B>,

Source§

fn div_assign(&mut self, rhs: B)

Performs the /= operation. Read more
Source§

impl DivAssign for Integer

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl Divisibility for Integer

Source§

fn divides(self, rhs: Self) -> bool

Determines if there exists an element x such that self*x = rhs
Source§

fn divide(self, rhs: Self) -> Option<Self>

Finds an element x such that self*x = rhs if such an element exists
Source§

fn unit(&self) -> bool

Determines if this element has a multiplicative inverse
Source§

fn inverse(self) -> Option<Self>

Finds this element’s multiplicative inverse if it exists
Source§

impl EuclideanDiv for Integer

Source§

type Naturals = Integer

The specific type used for the Euclidean Norm
Source§

fn euclid_norm(&self) -> Self::Naturals

A measure of the “degree” of a given element. Read more
Source§

fn div_euc(self, rhs: Self) -> Self

The quotient from Euclidean division
Source§

fn rem_euc(self, rhs: Self) -> Self

The remainder from the Euclidean division
Source§

fn div_alg(self, rhs: Self) -> (Self, Self)

Divides a pair of elements with remainder Read more
Source§

impl<T> From<T> for Integer
where Integer: From<T>,

Source§

fn from(src: T) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for Integer

Source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

impl GCD for Integer

Source§

fn gcd(self, rhs: Self) -> Self

Finds the greatest common divisor of two elements Read more
Source§

fn lcm(self, rhs: Self) -> Self

Finds the least common multiple of two elements Read more
Source§

impl IntegerSubset for Integer

Source§

type Signed = Integer

This type’s corresponding signed Integer representation Read more
Source§

type Unsigned = Integer

This type’s corresponding unsigned Integer representation Read more
Source§

fn as_signed(self) -> Self::Signed

Converts self to a signed integer representation Read more
Source§

fn as_unsigned(self) -> Self::Unsigned

Converts self into an unsigned integer representation Read more
Source§

fn abs_unsigned(self) -> Self::Unsigned

Takes the absolute value and converts into an unsigned integer representation Read more
Source§

fn two() -> Self

A shorthand for 1+1
Source§

fn mul_two(self) -> Self

Multiplies by two Read more
Source§

fn div_two(self) -> Self

Divides by two Read more
Source§

fn even(&self) -> bool

Determines if a number is divisible by two
Source§

fn odd(&self) -> bool

Determines if a number is not divisible by two
Source§

impl<'a> Mul<&'a Integer> for Integer

Source§

type Output = Integer

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, B> Mul<B> for &'a Integer
where Integer: Mul<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: B) -> Self::Output

Performs the * operation. Read more
Source§

impl<B> Mul<B> for Integer
where Integer: Mul<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: B) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<Integer> for &'a Integer

Source§

type Output = Integer

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Integer) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul for &'a Integer

Source§

type Output = Integer

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Integer) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Integer

Source§

type Output = Integer

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Integer) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> MulAssign<&'a Integer> for Integer

Source§

fn mul_assign(&mut self, rhs: &Self)

Performs the *= operation. Read more
Source§

impl<B> MulAssign<B> for Integer
where Integer: MulAssign<B>,

Source§

fn mul_assign(&mut self, rhs: B)

Performs the *= operation. Read more
Source§

impl MulAssign for Integer

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for Integer

Source§

type Output = Integer

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl One for Integer

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

impl Ord for Integer

Source§

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

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

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

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

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

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

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

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

impl PartialEq for Integer

Source§

fn eq(&self, other: &Integer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Integer

Source§

fn partial_cmp(&self, other: &Integer) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Primality for Integer

Source§

fn prime(&self) -> bool

Trial division algorithm

Source§

fn irreducible(&self) -> bool

Determines if this element cannot be produced from the product of two other non-invertible elements
Source§

impl<'a> Rem<&'a Integer> for Integer

Source§

type Output = Integer

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Self) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, B> Rem<B> for &'a Integer
where Integer: Rem<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: B) -> Self::Output

Performs the % operation. Read more
Source§

impl<B> Rem<B> for Integer
where Integer: Rem<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: B) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a> Rem<Integer> for &'a Integer

Source§

type Output = Integer

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Integer) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a> Rem for &'a Integer

Source§

type Output = Integer

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &'a Integer) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem for Integer

Source§

type Output = Integer

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Integer) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a> RemAssign<&'a Integer> for Integer

Source§

fn rem_assign(&mut self, rhs: &Self)

Performs the %= operation. Read more
Source§

impl<B> RemAssign<B> for Integer
where Integer: RemAssign<B>,

Source§

fn rem_assign(&mut self, rhs: B)

Performs the %= operation. Read more
Source§

impl RemAssign for Integer

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl<'a, B> Shl<B> for &'a Integer
where Integer: Shl<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: B) -> Self::Output

Performs the << operation. Read more
Source§

impl<B> Shl<B> for Integer
where Integer: Shl<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: B) -> Self::Output

Performs the << operation. Read more
Source§

impl<B> ShlAssign<B> for Integer
where Integer: ShlAssign<B>,

Source§

fn shl_assign(&mut self, rhs: B)

Performs the <<= operation. Read more
Source§

impl<'a, B> Shr<B> for &'a Integer
where Integer: Shr<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: B) -> Self::Output

Performs the >> operation. Read more
Source§

impl<B> Shr<B> for Integer
where Integer: Shr<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: B) -> Self::Output

Performs the >> operation. Read more
Source§

impl<B> ShrAssign<B> for Integer
where Integer: ShrAssign<B>,

Source§

fn shr_assign(&mut self, rhs: B)

Performs the >>= operation. Read more
Source§

impl Sign for Integer

Source§

fn signum(self) -> Self

Returns 1 if positive, -1 if negative, or itself (ie. 0 or NaN) if neither
Source§

fn abs(self) -> Self

Returns this element’s negative if less than 0 or itself otherwise
Source§

impl<'a> Sub<&'a Integer> for Integer

Source§

type Output = Integer

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, B> Sub<B> for &'a Integer
where Integer: Sub<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: B) -> Self::Output

Performs the - operation. Read more
Source§

impl<B> Sub<B> for Integer
where Integer: Sub<B, Output = Integer>,

Source§

type Output = Integer

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: B) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<Integer> for &'a Integer

Source§

type Output = Integer

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Integer) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub for &'a Integer

Source§

type Output = Integer

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Integer) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for Integer

Source§

type Output = Integer

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Integer) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> SubAssign<&'a Integer> for Integer

Source§

fn sub_assign(&mut self, rhs: &Self)

Performs the -= operation. Read more
Source§

impl<B> SubAssign<B> for Integer
where Integer: SubAssign<B>,

Source§

fn sub_assign(&mut self, rhs: B)

Performs the -= operation. Read more
Source§

impl SubAssign for Integer

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl ToPrimitive for Integer

Source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
Source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
Source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
Source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
Source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
Source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
Source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
Source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
Source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
Source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
Source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
Source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
Source§

impl Zero for Integer

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl AddAssociative for Integer

Source§

impl AddCommutative for Integer

Source§

impl AddOrdered for Integer

Source§

impl ArchimedeanProperty for Integer

Source§

impl Distributive for Integer

Source§

impl Eq for Integer

Source§

impl Integer for Integer

Source§

impl MulAssociative for Integer

Source§

impl MulCommutative for Integer

Source§

impl MulOrdered for Integer

Source§

impl Natural for Integer

Source§

impl NoZeroDivisors for Integer

Source§

impl StructuralPartialEq for Integer

Source§

impl UniquelyFactorizable for Integer

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

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

Casts the value.
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where 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 Dst
where Src: CheckedCast<Dst>,

Source§

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

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<G> MulN for G
where G: AddSemigroup + Zero,

Source§

fn mul_n<N>(self, n: N) -> Self
where N: Natural,

Source§

impl<G> MulZ for G
where G: AddMonoid + Negatable,

Source§

fn mul_z<N>(self, n: N) -> Self
where N: IntegerSubset,

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 Dst
where Src: OverflowingCast<Dst>,

Source§

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

Casts the value.
Source§

impl<G> PowN for G
where G: MulSemigroup + One,

Source§

fn pow_n<N>(self, n: N) -> Self
where N: Natural,

Source§

impl<T> SaturatingAs for T

Source§

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

Casts the value.
Source§

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

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<G> Signed for G
where G: PartialOrd + Zero,

Source§

default fn positive(&self) -> bool

If this element is strictly greater than zero
Source§

default fn negative(&self) -> bool

If this element is strictly less than zero
Source§

default fn non_negative(&self) -> bool

If this element is greater than or equal to zero
Source§

default fn non_positive(&self) -> bool

If this element is less than or equal to zero
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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
Source§

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

Source§

fn to_string(&self) -> String

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where 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) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

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

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
Source§

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

Source§

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

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,