[][src]Struct smallbigint::Int

pub struct Int(_);

Implementations

impl Int[src]

pub const fn zero() -> Self[src]

pub const fn small(x: i32) -> Self[src]

pub fn big(v: BigInt) -> Self[src]

pub fn cow_big(&self) -> Cow<'_, BigInt>[src]

A convenience function to get or convert to a BigInt, without having to copy any heap-allocated data if we are already a &BigInt.

Given a variable x : &Int, the following pattern may be useful to get a &BigInt without unneeded allocation. If the Int is small, then we create a new temporary BigInt from it and the Rust compiler can automatically figure out the lifetimes.

let x1 = x.cow_big();
let x2 : &BigInt = x1.deref();

We have to

  • Put x1 in a variable, so that the compiler can figure out the lifetimes
  • Put x2 in a variable, otherwise the Rust compiler can't figure out its type.

pub fn normalize(self) -> Self[src]

If we're storing a BigInt but it would fit in a small int instead, then convert, and discard the heap-allocated memory.

pub fn normalize_ref(&self) -> Cow<'_, Self>[src]

Like normalize, but borrows instead.

impl Int[src]

pub fn into_uint(self) -> Option<Uint>[src]

Convert owned to Uint if nonnegative, otherwise None.

As there is not yet such a method on BigUint, for now this clones the underlying storage. https://github.com/rust-num/num-bigint/issues/120

pub fn to_uint(&self) -> Option<Uint>[src]

Convert reference to Uint if nonnegative, otherwise None.

Trait Implementations

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

type Output = Int

The resulting type after applying the + operator.

impl<'_, '_> Add<&'_ Int> for &'_ Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl<'_> Add<&'_ isize> for Int[src]

type Output = Int

The resulting type after applying the + operator.

impl<'_, '_> Add<&'_ isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl<'_> Add<&'_ usize> for Int[src]

type Output = Int

The resulting type after applying the + operator.

impl<'_, '_> Add<&'_ usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the + operator.

impl Add<Int> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<i128> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<i16> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<i32> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<i64> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<i8> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<isize> for Int[src]

type Output = Int

The resulting type after applying the + operator.

impl<'_> Add<isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the + operator.

impl Add<u128> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<u16> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<u32> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<u64> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<u8> for Int[src]

type Output = Int

The resulting type after applying the + operator.

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

type Output = Int

The resulting type after applying the + operator.

impl Add<usize> for Int[src]

type Output = Int

The resulting type after applying the + operator.

impl<'_> Add<usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the + operator.

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

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

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

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

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

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

impl<'_> AddAssign<&'_ isize> for Int[src]

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

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

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

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

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

impl<'_> AddAssign<&'_ usize> for Int[src]

impl AddAssign<Int> for Int[src]

impl AddAssign<i128> for Int[src]

impl AddAssign<i16> for Int[src]

impl AddAssign<i32> for Int[src]

impl AddAssign<i64> for Int[src]

impl AddAssign<i8> for Int[src]

impl AddAssign<isize> for Int[src]

impl AddAssign<u128> for Int[src]

impl AddAssign<u16> for Int[src]

impl AddAssign<u32> for Int[src]

impl AddAssign<u64> for Int[src]

impl AddAssign<u8> for Int[src]

impl AddAssign<usize> for Int[src]

impl CheckedAdd for Int[src]

impl CheckedDiv for Int[src]

impl CheckedMul for Int[src]

impl CheckedSub for Int[src]

impl Clone for Int[src]

impl Debug for Int[src]

impl Default for Int[src]

impl Display for Int[src]

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

type Output = Int

The resulting type after applying the / operator.

impl<'_, '_> Div<&'_ Int> for &'_ Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl<'_> Div<&'_ isize> for Int[src]

type Output = Int

The resulting type after applying the / operator.

impl<'_, '_> Div<&'_ isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl<'_> Div<&'_ usize> for Int[src]

type Output = Int

The resulting type after applying the / operator.

impl<'_, '_> Div<&'_ usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the / operator.

impl Div<Int> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<i128> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<i16> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<i32> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<i64> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<i8> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<isize> for Int[src]

type Output = Int

The resulting type after applying the / operator.

impl<'_> Div<isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the / operator.

impl Div<u128> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<u16> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<u32> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<u64> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<u8> for Int[src]

type Output = Int

The resulting type after applying the / operator.

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

type Output = Int

The resulting type after applying the / operator.

impl Div<usize> for Int[src]

type Output = Int

The resulting type after applying the / operator.

impl<'_> Div<usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the / operator.

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

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

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

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

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

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

impl<'_> DivAssign<&'_ isize> for Int[src]

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

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

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

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

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

impl<'_> DivAssign<&'_ usize> for Int[src]

impl DivAssign<Int> for Int[src]

impl DivAssign<i128> for Int[src]

impl DivAssign<i16> for Int[src]

impl DivAssign<i32> for Int[src]

impl DivAssign<i64> for Int[src]

impl DivAssign<i8> for Int[src]

impl DivAssign<isize> for Int[src]

impl DivAssign<u128> for Int[src]

impl DivAssign<u16> for Int[src]

impl DivAssign<u32> for Int[src]

impl DivAssign<u64> for Int[src]

impl DivAssign<u8> for Int[src]

impl DivAssign<usize> for Int[src]

impl Eq for Int[src]

impl From<BigInt> for Int[src]

impl From<Int> for BigInt[src]

impl From<Uint> for Int[src]

An alias for .into_uint().

impl From<i128> for Int[src]

impl From<i16> for Int[src]

impl From<i32> for Int[src]

impl From<i64> for Int[src]

impl From<i8> for Int[src]

impl From<isize> for Int[src]

impl From<u128> for Int[src]

impl From<u16> for Int[src]

impl From<u32> for Int[src]

impl From<u64> for Int[src]

impl From<u8> for Int[src]

impl From<usize> for Int[src]

impl FromPrimitive for Int[src]

impl FromStr for Int[src]

type Err = ParseBigIntError

The associated error which can be returned from parsing.

impl Hash for Int[src]

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

type Output = Int

The resulting type after applying the * operator.

impl<'_, '_> Mul<&'_ Int> for &'_ Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl<'_> Mul<&'_ isize> for Int[src]

type Output = Int

The resulting type after applying the * operator.

impl<'_, '_> Mul<&'_ isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl<'_> Mul<&'_ usize> for Int[src]

type Output = Int

The resulting type after applying the * operator.

impl<'_, '_> Mul<&'_ usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the * operator.

impl Mul<Int> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<i128> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<i16> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<i32> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<i64> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<i8> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<isize> for Int[src]

type Output = Int

The resulting type after applying the * operator.

impl<'_> Mul<isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the * operator.

impl Mul<u128> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<u16> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<u32> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<u64> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<u8> for Int[src]

type Output = Int

The resulting type after applying the * operator.

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

type Output = Int

The resulting type after applying the * operator.

impl Mul<usize> for Int[src]

type Output = Int

The resulting type after applying the * operator.

impl<'_> Mul<usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the * operator.

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

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

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

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

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

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

impl<'_> MulAssign<&'_ isize> for Int[src]

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

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

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

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

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

impl<'_> MulAssign<&'_ usize> for Int[src]

impl MulAssign<Int> for Int[src]

impl MulAssign<i128> for Int[src]

impl MulAssign<i16> for Int[src]

impl MulAssign<i32> for Int[src]

impl MulAssign<i64> for Int[src]

impl MulAssign<i8> for Int[src]

impl MulAssign<isize> for Int[src]

impl MulAssign<u128> for Int[src]

impl MulAssign<u16> for Int[src]

impl MulAssign<u32> for Int[src]

impl MulAssign<u64> for Int[src]

impl MulAssign<u8> for Int[src]

impl MulAssign<usize> for Int[src]

impl Neg for Int[src]

type Output = Int

The resulting type after applying the - operator.

impl<'_> Neg for &'_ Int[src]

type Output = Int

The resulting type after applying the - operator.

impl One for Int[src]

impl Ord for Int[src]

impl<'_> PartialEq<&'_ Int> for Uint[src]

impl<'_> PartialEq<&'_ Int> for Int[src]

impl<'_> PartialEq<&'_ Int> for i32[src]

impl<'_> PartialEq<&'_ Int> for i64[src]

impl<'_> PartialEq<&'_ Int> for i128[src]

impl<'_> PartialEq<&'_ Int> for isize[src]

impl<'_> PartialEq<&'_ Int> for u8[src]

impl<'_> PartialEq<&'_ Int> for u16[src]

impl<'_> PartialEq<&'_ Int> for u32[src]

impl<'_> PartialEq<&'_ Int> for u64[src]

impl<'_> PartialEq<&'_ Int> for u128[src]

impl<'_> PartialEq<&'_ Int> for usize[src]

impl<'_> PartialEq<&'_ Int> for i8[src]

impl<'_> PartialEq<&'_ Int> for i16[src]

impl<'_> PartialEq<&'_ Uint> for Int[src]

impl<'_> PartialEq<&'_ i128> for Int[src]

impl<'_> PartialEq<&'_ i16> for Int[src]

impl<'_> PartialEq<&'_ i32> for Int[src]

impl<'_> PartialEq<&'_ i64> for Int[src]

impl<'_> PartialEq<&'_ i8> for Int[src]

impl<'_> PartialEq<&'_ isize> for Int[src]

impl<'_> PartialEq<&'_ u128> for Int[src]

impl<'_> PartialEq<&'_ u16> for Int[src]

impl<'_> PartialEq<&'_ u32> for Int[src]

impl<'_> PartialEq<&'_ u64> for Int[src]

impl<'_> PartialEq<&'_ u8> for Int[src]

impl<'_> PartialEq<&'_ usize> for Int[src]

impl PartialEq<Int> for Uint[src]

pub fn eq(&self, other: &Int) -> bool[src]

Cannot use the small-int optimization, and copies the Uint into a BigInt.

impl PartialEq<Int> for Int[src]

impl PartialEq<Int> for u64[src]

impl<'_> PartialEq<Int> for &'_ u64[src]

impl PartialEq<Int> for u128[src]

impl<'_> PartialEq<Int> for &'_ u128[src]

impl PartialEq<Int> for usize[src]

impl<'_> PartialEq<Int> for &'_ usize[src]

impl PartialEq<Int> for i8[src]

impl<'_> PartialEq<Int> for &'_ i8[src]

impl PartialEq<Int> for i16[src]

impl<'_> PartialEq<Int> for &'_ i16[src]

impl<'_> PartialEq<Int> for &'_ Uint[src]

impl PartialEq<Int> for i32[src]

impl<'_> PartialEq<Int> for &'_ i32[src]

impl PartialEq<Int> for i64[src]

impl<'_> PartialEq<Int> for &'_ i64[src]

impl PartialEq<Int> for i128[src]

impl<'_> PartialEq<Int> for &'_ i128[src]

impl PartialEq<Int> for isize[src]

impl<'_> PartialEq<Int> for &'_ isize[src]

impl<'_> PartialEq<Int> for &'_ Int[src]

impl PartialEq<Int> for u8[src]

impl<'_> PartialEq<Int> for &'_ u8[src]

impl PartialEq<Int> for u16[src]

impl<'_> PartialEq<Int> for &'_ u16[src]

impl PartialEq<Int> for u32[src]

impl<'_> PartialEq<Int> for &'_ u32[src]

impl PartialEq<Uint> for Int[src]

pub fn eq(&self, other: &Uint) -> bool[src]

Cannot use the small-int optimization, and copies the Uint into a BigInt.

impl<'_> PartialEq<Uint> for &'_ Int[src]

impl PartialEq<i128> for Int[src]

impl<'_> PartialEq<i128> for &'_ Int[src]

impl PartialEq<i16> for Int[src]

impl<'_> PartialEq<i16> for &'_ Int[src]

impl PartialEq<i32> for Int[src]

impl<'_> PartialEq<i32> for &'_ Int[src]

impl PartialEq<i64> for Int[src]

impl<'_> PartialEq<i64> for &'_ Int[src]

impl PartialEq<i8> for Int[src]

impl<'_> PartialEq<i8> for &'_ Int[src]

impl PartialEq<isize> for Int[src]

impl<'_> PartialEq<isize> for &'_ Int[src]

impl PartialEq<u128> for Int[src]

impl<'_> PartialEq<u128> for &'_ Int[src]

impl PartialEq<u16> for Int[src]

impl<'_> PartialEq<u16> for &'_ Int[src]

impl PartialEq<u32> for Int[src]

impl<'_> PartialEq<u32> for &'_ Int[src]

impl PartialEq<u64> for Int[src]

impl<'_> PartialEq<u64> for &'_ Int[src]

impl PartialEq<u8> for Int[src]

impl<'_> PartialEq<u8> for &'_ Int[src]

impl PartialEq<usize> for Int[src]

impl<'_> PartialEq<usize> for &'_ Int[src]

impl<'_> PartialOrd<&'_ Int> for Uint[src]

impl<'_> PartialOrd<&'_ Int> for Int[src]

impl<'_> PartialOrd<&'_ Int> for i32[src]

impl<'_> PartialOrd<&'_ Int> for i64[src]

impl<'_> PartialOrd<&'_ Int> for i128[src]

impl<'_> PartialOrd<&'_ Int> for isize[src]

impl<'_> PartialOrd<&'_ Int> for u8[src]

impl<'_> PartialOrd<&'_ Int> for u16[src]

impl<'_> PartialOrd<&'_ Int> for u32[src]

impl<'_> PartialOrd<&'_ Int> for u64[src]

impl<'_> PartialOrd<&'_ Int> for u128[src]

impl<'_> PartialOrd<&'_ Int> for usize[src]

impl<'_> PartialOrd<&'_ Int> for i8[src]

impl<'_> PartialOrd<&'_ Int> for i16[src]

impl<'_> PartialOrd<&'_ Uint> for Int[src]

impl<'_> PartialOrd<&'_ i128> for Int[src]

impl<'_> PartialOrd<&'_ i16> for Int[src]

impl<'_> PartialOrd<&'_ i32> for Int[src]

impl<'_> PartialOrd<&'_ i64> for Int[src]

impl<'_> PartialOrd<&'_ i8> for Int[src]

impl<'_> PartialOrd<&'_ isize> for Int[src]

impl<'_> PartialOrd<&'_ u128> for Int[src]

impl<'_> PartialOrd<&'_ u16> for Int[src]

impl<'_> PartialOrd<&'_ u32> for Int[src]

impl<'_> PartialOrd<&'_ u64> for Int[src]

impl<'_> PartialOrd<&'_ u8> for Int[src]

impl<'_> PartialOrd<&'_ usize> for Int[src]

impl PartialOrd<Int> for Int[src]

impl PartialOrd<Int> for Uint[src]

impl PartialOrd<Int> for u64[src]

impl<'_> PartialOrd<Int> for &'_ u64[src]

impl PartialOrd<Int> for u128[src]

impl<'_> PartialOrd<Int> for &'_ u128[src]

impl PartialOrd<Int> for usize[src]

impl<'_> PartialOrd<Int> for &'_ usize[src]

impl PartialOrd<Int> for i8[src]

impl<'_> PartialOrd<Int> for &'_ i8[src]

impl PartialOrd<Int> for i16[src]

impl<'_> PartialOrd<Int> for &'_ i16[src]

impl<'_> PartialOrd<Int> for &'_ Uint[src]

impl PartialOrd<Int> for i32[src]

impl<'_> PartialOrd<Int> for &'_ i32[src]

impl PartialOrd<Int> for i64[src]

impl<'_> PartialOrd<Int> for &'_ i64[src]

impl PartialOrd<Int> for i128[src]

impl<'_> PartialOrd<Int> for &'_ i128[src]

impl PartialOrd<Int> for isize[src]

impl<'_> PartialOrd<Int> for &'_ isize[src]

impl<'_> PartialOrd<Int> for &'_ Int[src]

impl PartialOrd<Int> for u8[src]

impl<'_> PartialOrd<Int> for &'_ u8[src]

impl PartialOrd<Int> for u16[src]

impl<'_> PartialOrd<Int> for &'_ u16[src]

impl PartialOrd<Int> for u32[src]

impl<'_> PartialOrd<Int> for &'_ u32[src]

impl PartialOrd<Uint> for Int[src]

impl<'_> PartialOrd<Uint> for &'_ Int[src]

impl PartialOrd<i128> for Int[src]

impl<'_> PartialOrd<i128> for &'_ Int[src]

impl PartialOrd<i16> for Int[src]

impl<'_> PartialOrd<i16> for &'_ Int[src]

impl PartialOrd<i32> for Int[src]

impl<'_> PartialOrd<i32> for &'_ Int[src]

impl PartialOrd<i64> for Int[src]

impl<'_> PartialOrd<i64> for &'_ Int[src]

impl PartialOrd<i8> for Int[src]

impl<'_> PartialOrd<i8> for &'_ Int[src]

impl PartialOrd<isize> for Int[src]

impl<'_> PartialOrd<isize> for &'_ Int[src]

impl PartialOrd<u128> for Int[src]

impl<'_> PartialOrd<u128> for &'_ Int[src]

impl PartialOrd<u16> for Int[src]

impl<'_> PartialOrd<u16> for &'_ Int[src]

impl PartialOrd<u32> for Int[src]

impl<'_> PartialOrd<u32> for &'_ Int[src]

impl PartialOrd<u64> for Int[src]

impl<'_> PartialOrd<u64> for &'_ Int[src]

impl PartialOrd<u8> for Int[src]

impl<'_> PartialOrd<u8> for &'_ Int[src]

impl PartialOrd<usize> for Int[src]

impl<'_> PartialOrd<usize> for &'_ Int[src]

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

type Output = Int

The resulting type after applying the % operator.

impl<'_, '_> Rem<&'_ Int> for &'_ Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl<'_> Rem<&'_ isize> for Int[src]

type Output = Int

The resulting type after applying the % operator.

impl<'_, '_> Rem<&'_ isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl<'_> Rem<&'_ usize> for Int[src]

type Output = Int

The resulting type after applying the % operator.

impl<'_, '_> Rem<&'_ usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the % operator.

impl Rem<Int> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<i128> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<i16> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<i32> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<i64> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<i8> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<isize> for Int[src]

type Output = Int

The resulting type after applying the % operator.

impl<'_> Rem<isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the % operator.

impl Rem<u128> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<u16> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<u32> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<u64> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<u8> for Int[src]

type Output = Int

The resulting type after applying the % operator.

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

type Output = Int

The resulting type after applying the % operator.

impl Rem<usize> for Int[src]

type Output = Int

The resulting type after applying the % operator.

impl<'_> Rem<usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the % operator.

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

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

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

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

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

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

impl<'_> RemAssign<&'_ isize> for Int[src]

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

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

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

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

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

impl<'_> RemAssign<&'_ usize> for Int[src]

impl RemAssign<Int> for Int[src]

impl RemAssign<i128> for Int[src]

impl RemAssign<i16> for Int[src]

impl RemAssign<i32> for Int[src]

impl RemAssign<i64> for Int[src]

impl RemAssign<i8> for Int[src]

impl RemAssign<isize> for Int[src]

impl RemAssign<u128> for Int[src]

impl RemAssign<u16> for Int[src]

impl RemAssign<u32> for Int[src]

impl RemAssign<u64> for Int[src]

impl RemAssign<u8> for Int[src]

impl RemAssign<usize> for Int[src]

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

type Output = Int

The resulting type after applying the - operator.

impl<'_, '_> Sub<&'_ Int> for &'_ Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl<'_> Sub<&'_ isize> for Int[src]

type Output = Int

The resulting type after applying the - operator.

impl<'_, '_> Sub<&'_ isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl<'_> Sub<&'_ usize> for Int[src]

type Output = Int

The resulting type after applying the - operator.

impl<'_, '_> Sub<&'_ usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the - operator.

impl Sub<Int> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<i128> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<i16> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<i32> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<i64> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<i8> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<isize> for Int[src]

type Output = Int

The resulting type after applying the - operator.

impl<'_> Sub<isize> for &'_ Int[src]

type Output = Int

The resulting type after applying the - operator.

impl Sub<u128> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<u16> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<u32> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<u64> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<u8> for Int[src]

type Output = Int

The resulting type after applying the - operator.

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

type Output = Int

The resulting type after applying the - operator.

impl Sub<usize> for Int[src]

type Output = Int

The resulting type after applying the - operator.

impl<'_> Sub<usize> for &'_ Int[src]

type Output = Int

The resulting type after applying the - operator.

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

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

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

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

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

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

impl<'_> SubAssign<&'_ isize> for Int[src]

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

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

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

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

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

impl<'_> SubAssign<&'_ usize> for Int[src]

impl SubAssign<Int> for Int[src]

impl SubAssign<i128> for Int[src]

impl SubAssign<i16> for Int[src]

impl SubAssign<i32> for Int[src]

impl SubAssign<i64> for Int[src]

impl SubAssign<i8> for Int[src]

impl SubAssign<isize> for Int[src]

impl SubAssign<u128> for Int[src]

impl SubAssign<u16> for Int[src]

impl SubAssign<u32> for Int[src]

impl SubAssign<u64> for Int[src]

impl SubAssign<u8> for Int[src]

impl SubAssign<usize> for Int[src]

impl ToPrimitive for Int[src]

impl TryFrom<Int> for Uint[src]

An alias for .into_int().

type Error = IntIsNegativeError

The type returned in the event of a conversion error.

pub fn try_from(v: Int) -> Result<Self, Self::Error>[src]

Fails on negative numbers.

impl Zero for Int[src]

Auto Trait Implementations

impl RefUnwindSafe for Int

impl Send for Int

impl Sync for Int

impl Unpin for Int

impl UnwindSafe for Int

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, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

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>, 
[src]

impl<T, Base> RefNum<Base> for T where
    T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>, 
[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.