Struct reckoner::Integer[][src]

#[repr(transparent)]
pub struct Integer { /* fields omitted */ }

Multiple precision integer value.

Implementations

impl Integer[src]

pub fn add(&self, other: &Self) -> Self[src]

Add two integers and return the result

pub fn add_assign(&mut self, other: &Self)[src]

Add two integers and assign the result to self

pub fn subtract(&self, other: &Self) -> Self[src]

Subtract two integers and return the result

pub fn subtract_assign(&mut self, other: &Self)[src]

Subtract two integers and assign the result to self

pub fn multiply(&self, other: &Self) -> Self[src]

Multiply two integers and return the result

pub fn multiply_assign(&mut self, other: &Self)[src]

Multiply two integers and assign the result to self

pub fn negate(&self) -> Self[src]

Return the additive inverse

pub fn negate_assign(&mut self)[src]

Assign the additive inverse to self

pub fn absolute_value(&self) -> Self[src]

Return the absolute value

pub fn absolute_value_assign(&mut self)[src]

Assign the absolute value to self

pub fn divide_full(&self, rhs: &Self) -> (Self, Self)[src]

Divide two integers and return quotient and remainder

pub fn divide(&self, rhs: &Self) -> Self[src]

Divide two integers and return only quotient

pub fn divide_assign(&mut self, rhs: &Self)[src]

Divide two integers and assign the result to self

pub fn remainder(&self, rhs: &Self) -> Self[src]

Divide two integers and return only remainder

pub fn remainder_assign(&mut self, rhs: &Self)[src]

Divide two integers and assign the remainder to self

impl Integer[src]

pub fn new() -> Self[src]

Construct a new integer with a default value of zero.

Example

use reckoner::Integer;

let a = Integer::new();

assert_eq!(a, 0);

pub unsafe fn from_raw(raw: *mut mpz_t) -> Self[src]

Construct an Integer from a raw non-null pointer to creachadair_imath_sys::mpz_t.

Safety

This function must only every be called once for a given pointer, and the pointer must point to an initialized creachadair_imath_sys::mpz_t struct. The recommendation is to only use raw pointers from the Integer::into_raw function.

In ths context, initialized means that the creachadair_imath_sys::mpz_t has been the argument of a call to creachadair_imath_sys::mp_int_init.

Example

use creachadair_imath_sys::{mp_int_zero, MP_OK};
use reckoner::Integer;

let a = Integer::from(300);

assert_eq!(a, 300);

let a_raw = Integer::into_raw(a);

unsafe { mp_int_zero(a_raw) };

let a = unsafe { Integer::from_raw(a_raw) };

assert_eq!(a, 0);

pub fn into_raw(integer: Integer) -> *mut mpz_t[src]

Consumes the Integer, returning a wrapped raw pointer.

Example

use creachadair_imath_sys::{mp_int_add, MP_OK};
use reckoner::Integer;

let a = Integer::from(200);
let b = Integer::from(300);
let c = Integer::new();

let a_raw = Integer::into_raw(a);
let b_raw = Integer::into_raw(b);
let c_raw = Integer::into_raw(c);

let op_res = unsafe { mp_int_add(a_raw, b_raw, c_raw) };

if op_res != unsafe { MP_OK } {
    panic!("Operation failed.")
}

let a = unsafe { Integer::from_raw(a_raw) };
let b = unsafe { Integer::from_raw(b_raw) };
let c = unsafe { Integer::from_raw(c_raw) };

assert_eq!(a, 200);
assert_eq!(b, 300);
assert_eq!(c, 500);

pub fn copy_to(&self, other: &mut Self)[src]

Replaces the value of other with a copy of the value of self. No new memory is allocated unless self has more significant digits than other has allocated.

Example

use reckoner::Integer;

let a = Integer::from(20);
let mut b = Integer::new();

assert_eq!(a, 20);
assert_eq!(b, 0);

a.copy_to(&mut b);

assert_eq!(a, 20);
assert_eq!(b, 20, "Failed to copy");

pub fn zero(&mut self)[src]

Set value of integer to zero

Example

use reckoner::Integer;

let mut a = Integer::from(21837419283648u128);

assert_eq!(a, 21837419283648u128);
a.zero();
assert_eq!(a, 0);

pub fn compare(&self, rhs: &Self) -> Ordering[src]

Compare two integers

Example

use reckoner::Integer;
use core::cmp::Ordering;

let a = Integer::from(123);
let b = Integer::from(456);

assert_eq!(a.compare(&b), Ordering::Less);
assert_eq!(b.compare(&a), Ordering::Greater);
assert_eq!(b.compare(&b), Ordering::Equal);

pub fn compare_magnitude(&self, rhs: &Self) -> Ordering[src]

Compare the magnitude of two integers, not taking sign into account.

Example

use core::cmp::Ordering;
use reckoner::Integer;

let a = Integer::from(-234);
let b = Integer::from(123);

assert_eq!(a.compare_magnitude(&b), Ordering::Greater);
assert_eq!(a.compare(&b), Ordering::Less);

pub fn compare_zero(&self) -> Ordering[src]

Compare an integer to zero.

Example

use core::cmp::Ordering;
use reckoner::Integer;

let a = Integer::from(-234);
let b = Integer::from(123);

assert_eq!(a.compare_zero(), Ordering::Less);
assert_eq!(b.compare_zero(), Ordering::Greater);

Trait Implementations

impl Add<&'_ Integer> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ Integer> for Rational[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<&'_ Integer> for &Rational[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<&'_ Rational> for Integer[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<&'_ Rational> for &Integer[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<&'_ i128> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i128> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i16> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i16> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i32> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i32> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i64> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i64> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i8> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ i8> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u128> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u128> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u16> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u16> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u32> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u32> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u64> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u64> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u8> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<&'_ u8> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<Integer> for Rational[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<Integer> for &Rational[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<Rational> for Integer[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<Rational> for &Integer[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<i128> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i128> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i16> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i16> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i32> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i32> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i64> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i64> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i8> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<i8> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u128> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u128> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u16> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u16> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u32> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u32> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u64> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u64> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u8> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Add<u8> for &Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl AddAssign<&'_ Integer> for Integer[src]

impl AddAssign<&'_ Integer> for Rational[src]

impl AddAssign<&'_ i128> for Integer[src]

impl AddAssign<&'_ i16> for Integer[src]

impl AddAssign<&'_ i32> for Integer[src]

impl AddAssign<&'_ i64> for Integer[src]

impl AddAssign<&'_ i8> for Integer[src]

impl AddAssign<&'_ u128> for Integer[src]

impl AddAssign<&'_ u16> for Integer[src]

impl AddAssign<&'_ u32> for Integer[src]

impl AddAssign<&'_ u64> for Integer[src]

impl AddAssign<&'_ u8> for Integer[src]

impl AddAssign<Integer> for Integer[src]

impl AddAssign<Integer> for Rational[src]

impl AddAssign<i128> for Integer[src]

impl AddAssign<i16> for Integer[src]

impl AddAssign<i32> for Integer[src]

impl AddAssign<i64> for Integer[src]

impl AddAssign<i8> for Integer[src]

impl AddAssign<u128> for Integer[src]

impl AddAssign<u16> for Integer[src]

impl AddAssign<u32> for Integer[src]

impl AddAssign<u64> for Integer[src]

impl AddAssign<u8> for Integer[src]

impl Clone for Integer[src]

impl Debug for Integer[src]

impl Default for Integer[src]

impl Display for Integer[src]

impl Div<&'_ Integer> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ Integer> for Rational[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<&'_ Integer> for &Rational[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<&'_ Rational> for Integer[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<&'_ Rational> for &Integer[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<&'_ i128> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i128> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i16> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i16> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i32> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i32> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i64> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i64> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i8> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ i8> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u128> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u128> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u16> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u16> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u32> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u32> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u64> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u64> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u8> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<&'_ u8> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<Integer> for Rational[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<Integer> for &Rational[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<Rational> for Integer[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<Rational> for &Integer[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<i128> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i128> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i16> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i16> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i32> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i32> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i64> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i64> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i8> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<i8> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u128> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u128> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u16> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u16> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u32> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u32> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u64> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u64> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u8> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl Div<u8> for &Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl DivAssign<&'_ Integer> for Integer[src]

impl DivAssign<&'_ Integer> for Rational[src]

impl DivAssign<&'_ i128> for Integer[src]

impl DivAssign<&'_ i16> for Integer[src]

impl DivAssign<&'_ i32> for Integer[src]

impl DivAssign<&'_ i64> for Integer[src]

impl DivAssign<&'_ i8> for Integer[src]

impl DivAssign<&'_ u128> for Integer[src]

impl DivAssign<&'_ u16> for Integer[src]

impl DivAssign<&'_ u32> for Integer[src]

impl DivAssign<&'_ u64> for Integer[src]

impl DivAssign<&'_ u8> for Integer[src]

impl DivAssign<Integer> for Integer[src]

impl DivAssign<Integer> for Rational[src]

impl DivAssign<i128> for Integer[src]

impl DivAssign<i16> for Integer[src]

impl DivAssign<i32> for Integer[src]

impl DivAssign<i64> for Integer[src]

impl DivAssign<i8> for Integer[src]

impl DivAssign<u128> for Integer[src]

impl DivAssign<u16> for Integer[src]

impl DivAssign<u32> for Integer[src]

impl DivAssign<u64> for Integer[src]

impl DivAssign<u8> for Integer[src]

impl Drop for Integer[src]

impl Eq for Integer[src]

impl From<&'_ Integer> for Rational[src]

impl From<&'_ i128> for Integer[src]

impl From<&'_ i16> for Integer[src]

impl From<&'_ i32> for Integer[src]

impl From<&'_ i64> for Integer[src]

impl From<&'_ i8> for Integer[src]

impl From<&'_ u128> for Integer[src]

impl From<&'_ u16> for Integer[src]

impl From<&'_ u32> for Integer[src]

impl From<&'_ u64> for Integer[src]

impl From<&'_ u8> for Integer[src]

impl From<Integer> for Rational[src]

impl From<i128> for Integer[src]

impl From<i16> for Integer[src]

impl From<i32> for Integer[src]

impl From<i64> for Integer[src]

impl From<i8> for Integer[src]

impl From<u128> for Integer[src]

impl From<u16> for Integer[src]

impl From<u32> for Integer[src]

impl From<u64> for Integer[src]

impl From<u8> for Integer[src]

impl FromStr for Integer[src]

type Err = Error

The associated error which can be returned from parsing.

impl Mul<&'_ Integer> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ Integer> for Rational[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<&'_ Integer> for &Rational[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<&'_ Rational> for Integer[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<&'_ Rational> for &Integer[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<&'_ i128> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i128> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i16> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i16> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i32> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i32> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i64> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i64> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i8> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ i8> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u128> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u128> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u16> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u16> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u32> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u32> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u64> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u64> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u8> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<&'_ u8> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<Integer> for Rational[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<Integer> for &Rational[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<Rational> for Integer[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<Rational> for &Integer[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<i128> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i128> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i16> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i16> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i32> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i32> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i64> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i64> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i8> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<i8> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u128> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u128> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u16> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u16> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u32> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u32> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u64> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u64> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u8> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Mul<u8> for &Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl MulAssign<&'_ Integer> for Integer[src]

impl MulAssign<&'_ Integer> for Rational[src]

impl MulAssign<&'_ i128> for Integer[src]

impl MulAssign<&'_ i16> for Integer[src]

impl MulAssign<&'_ i32> for Integer[src]

impl MulAssign<&'_ i64> for Integer[src]

impl MulAssign<&'_ i8> for Integer[src]

impl MulAssign<&'_ u128> for Integer[src]

impl MulAssign<&'_ u16> for Integer[src]

impl MulAssign<&'_ u32> for Integer[src]

impl MulAssign<&'_ u64> for Integer[src]

impl MulAssign<&'_ u8> for Integer[src]

impl MulAssign<Integer> for Integer[src]

impl MulAssign<Integer> for Rational[src]

impl MulAssign<i128> for Integer[src]

impl MulAssign<i16> for Integer[src]

impl MulAssign<i32> for Integer[src]

impl MulAssign<i64> for Integer[src]

impl MulAssign<i8> for Integer[src]

impl MulAssign<u128> for Integer[src]

impl MulAssign<u16> for Integer[src]

impl MulAssign<u32> for Integer[src]

impl MulAssign<u64> for Integer[src]

impl MulAssign<u8> for Integer[src]

impl Neg for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Neg for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Ord for Integer[src]

impl PartialEq<Integer> for Integer[src]

impl PartialEq<Integer> for Rational[src]

impl PartialEq<Rational> for Integer[src]

impl PartialEq<i128> for Integer[src]

impl PartialEq<i16> for Integer[src]

impl PartialEq<i32> for Integer[src]

impl PartialEq<i64> for Integer[src]

impl PartialEq<i8> for Integer[src]

impl PartialEq<u128> for Integer[src]

impl PartialEq<u16> for Integer[src]

impl PartialEq<u32> for Integer[src]

impl PartialEq<u64> for Integer[src]

impl PartialEq<u8> for Integer[src]

impl PartialOrd<Integer> for Integer[src]

impl PartialOrd<Integer> for Rational[src]

impl PartialOrd<Rational> for Integer[src]

impl PartialOrd<i128> for Integer[src]

impl PartialOrd<i16> for Integer[src]

impl PartialOrd<i32> for Integer[src]

impl PartialOrd<i64> for Integer[src]

impl PartialOrd<i8> for Integer[src]

impl PartialOrd<u128> for Integer[src]

impl PartialOrd<u16> for Integer[src]

impl PartialOrd<u32> for Integer[src]

impl PartialOrd<u64> for Integer[src]

impl PartialOrd<u8> for Integer[src]

impl Product<Integer> for Integer[src]

impl Rem<&'_ Integer> for Integer[src]

type Output = Integer

The resulting type after applying the % operator.

impl Rem<&'_ Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the % operator.

impl Rem<&'_ i128> for Integer[src]

type Output = i128

The resulting type after applying the % operator.

impl Rem<&'_ i128> for &Integer[src]

type Output = i128

The resulting type after applying the % operator.

impl Rem<&'_ i16> for Integer[src]

type Output = i16

The resulting type after applying the % operator.

impl Rem<&'_ i16> for &Integer[src]

type Output = i16

The resulting type after applying the % operator.

impl Rem<&'_ i32> for Integer[src]

type Output = i32

The resulting type after applying the % operator.

impl Rem<&'_ i32> for &Integer[src]

type Output = i32

The resulting type after applying the % operator.

impl Rem<&'_ i64> for Integer[src]

type Output = i64

The resulting type after applying the % operator.

impl Rem<&'_ i64> for &Integer[src]

type Output = i64

The resulting type after applying the % operator.

impl Rem<&'_ i8> for Integer[src]

type Output = i8

The resulting type after applying the % operator.

impl Rem<&'_ i8> for &Integer[src]

type Output = i8

The resulting type after applying the % operator.

impl Rem<&'_ u128> for Integer[src]

type Output = u128

The resulting type after applying the % operator.

impl Rem<&'_ u128> for &Integer[src]

type Output = u128

The resulting type after applying the % operator.

impl Rem<&'_ u16> for Integer[src]

type Output = u16

The resulting type after applying the % operator.

impl Rem<&'_ u16> for &Integer[src]

type Output = u16

The resulting type after applying the % operator.

impl Rem<&'_ u32> for Integer[src]

type Output = u32

The resulting type after applying the % operator.

impl Rem<&'_ u32> for &Integer[src]

type Output = u32

The resulting type after applying the % operator.

impl Rem<&'_ u64> for Integer[src]

type Output = u64

The resulting type after applying the % operator.

impl Rem<&'_ u64> for &Integer[src]

type Output = u64

The resulting type after applying the % operator.

impl Rem<&'_ u8> for Integer[src]

type Output = u8

The resulting type after applying the % operator.

impl Rem<&'_ u8> for &Integer[src]

type Output = u8

The resulting type after applying the % operator.

impl Rem<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the % operator.

impl Rem<Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the % operator.

impl Rem<i128> for Integer[src]

type Output = i128

The resulting type after applying the % operator.

impl Rem<i128> for &Integer[src]

type Output = i128

The resulting type after applying the % operator.

impl Rem<i16> for Integer[src]

type Output = i16

The resulting type after applying the % operator.

impl Rem<i16> for &Integer[src]

type Output = i16

The resulting type after applying the % operator.

impl Rem<i32> for Integer[src]

type Output = i32

The resulting type after applying the % operator.

impl Rem<i32> for &Integer[src]

type Output = i32

The resulting type after applying the % operator.

impl Rem<i64> for Integer[src]

type Output = i64

The resulting type after applying the % operator.

impl Rem<i64> for &Integer[src]

type Output = i64

The resulting type after applying the % operator.

impl Rem<i8> for Integer[src]

type Output = i8

The resulting type after applying the % operator.

impl Rem<i8> for &Integer[src]

type Output = i8

The resulting type after applying the % operator.

impl Rem<u128> for Integer[src]

type Output = u128

The resulting type after applying the % operator.

impl Rem<u128> for &Integer[src]

type Output = u128

The resulting type after applying the % operator.

impl Rem<u16> for Integer[src]

type Output = u16

The resulting type after applying the % operator.

impl Rem<u16> for &Integer[src]

type Output = u16

The resulting type after applying the % operator.

impl Rem<u32> for Integer[src]

type Output = u32

The resulting type after applying the % operator.

impl Rem<u32> for &Integer[src]

type Output = u32

The resulting type after applying the % operator.

impl Rem<u64> for Integer[src]

type Output = u64

The resulting type after applying the % operator.

impl Rem<u64> for &Integer[src]

type Output = u64

The resulting type after applying the % operator.

impl Rem<u8> for Integer[src]

type Output = u8

The resulting type after applying the % operator.

impl Rem<u8> for &Integer[src]

type Output = u8

The resulting type after applying the % operator.

impl RemAssign<&'_ Integer> for Integer[src]

impl RemAssign<&'_ i128> for Integer[src]

impl RemAssign<&'_ i16> for Integer[src]

impl RemAssign<&'_ i32> for Integer[src]

impl RemAssign<&'_ i64> for Integer[src]

impl RemAssign<&'_ i8> for Integer[src]

impl RemAssign<&'_ u128> for Integer[src]

impl RemAssign<&'_ u16> for Integer[src]

impl RemAssign<&'_ u32> for Integer[src]

impl RemAssign<&'_ u64> for Integer[src]

impl RemAssign<&'_ u8> for Integer[src]

impl RemAssign<Integer> for Integer[src]

impl RemAssign<i128> for Integer[src]

impl RemAssign<i16> for Integer[src]

impl RemAssign<i32> for Integer[src]

impl RemAssign<i64> for Integer[src]

impl RemAssign<i8> for Integer[src]

impl RemAssign<u128> for Integer[src]

impl RemAssign<u16> for Integer[src]

impl RemAssign<u32> for Integer[src]

impl RemAssign<u64> for Integer[src]

impl RemAssign<u8> for Integer[src]

impl Send for Integer[src]

impl Sub<&'_ Integer> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ Integer> for Rational[src]

type Output = Rational

The resulting type after applying the - operator.

impl Sub<&'_ Integer> for &Rational[src]

type Output = Rational

The resulting type after applying the - operator.

impl Sub<&'_ Rational> for Integer[src]

type Output = Rational

The resulting type after applying the - operator.

impl Sub<&'_ Rational> for &Integer[src]

type Output = Rational

The resulting type after applying the - operator.

impl Sub<&'_ i128> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i128> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i16> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i16> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i32> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i32> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i64> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i64> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i8> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ i8> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u128> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u128> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u16> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u16> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u32> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u32> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u64> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u64> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u8> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<&'_ u8> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<Integer> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<Integer> for Rational[src]

type Output = Rational

The resulting type after applying the - operator.

impl Sub<Integer> for &Rational[src]

type Output = Rational

The resulting type after applying the - operator.

impl Sub<Rational> for Integer[src]

type Output = Rational

The resulting type after applying the - operator.

impl Sub<Rational> for &Integer[src]

type Output = Rational

The resulting type after applying the - operator.

impl Sub<i128> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i128> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i16> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i16> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i32> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i32> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i64> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i64> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i8> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<i8> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u128> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u128> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u16> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u16> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u32> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u32> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u64> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u64> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u8> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<u8> for &Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl SubAssign<&'_ Integer> for Integer[src]

impl SubAssign<&'_ Integer> for Rational[src]

impl SubAssign<&'_ i128> for Integer[src]

impl SubAssign<&'_ i16> for Integer[src]

impl SubAssign<&'_ i32> for Integer[src]

impl SubAssign<&'_ i64> for Integer[src]

impl SubAssign<&'_ i8> for Integer[src]

impl SubAssign<&'_ u128> for Integer[src]

impl SubAssign<&'_ u16> for Integer[src]

impl SubAssign<&'_ u32> for Integer[src]

impl SubAssign<&'_ u64> for Integer[src]

impl SubAssign<&'_ u8> for Integer[src]

impl SubAssign<Integer> for Integer[src]

impl SubAssign<Integer> for Rational[src]

impl SubAssign<i128> for Integer[src]

impl SubAssign<i16> for Integer[src]

impl SubAssign<i32> for Integer[src]

impl SubAssign<i64> for Integer[src]

impl SubAssign<i8> for Integer[src]

impl SubAssign<u128> for Integer[src]

impl SubAssign<u16> for Integer[src]

impl SubAssign<u32> for Integer[src]

impl SubAssign<u64> for Integer[src]

impl SubAssign<u8> for Integer[src]

impl Sum<Integer> for Integer[src]

impl TryFrom<&'_ Rational> for Integer[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Rational> for Integer[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Integer

impl !Sync for Integer

impl Unpin for Integer

impl UnwindSafe for Integer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.