pub struct BigInt(/* private fields */);
Implementations§
Source§impl BigInt
impl BigInt
pub fn new(sign: Sign, digits: Vec<u32>) -> BigInt
pub fn zero() -> BigInt
pub fn one() -> BigInt
pub fn from_unsigned_bytes_be(bytes: &[u8]) -> Self
pub fn from_unsigned_bytes_le(bytes: &[u8]) -> Self
pub fn from_signed_bytes_le(bytes: &[u8]) -> Self
pub fn from_signed_bytes_be(bytes: &[u8]) -> Self
pub fn from_bytes_le(sign: BigIntSign, bytes: &[u8]) -> Self
pub fn to_bytes_le(&self) -> (BigIntSign, Vec<u8>)
pub fn to_bytes_be(&self) -> (BigIntSign, Vec<u8>)
pub fn to_signed_bytes_le(&self) -> Vec<u8> ⓘ
pub fn to_signed_bytes_be(&self) -> Vec<u8> ⓘ
pub fn to_u64(&self) -> u64
pub fn to_i32(&self) -> i32
pub fn pow(self, exponent: u32) -> Self
pub fn bits(&self) -> usize
pub fn is_zero(&self) -> bool
pub fn is_one(&self) -> bool
pub fn neg(&self) -> BigInt
pub fn from_store_bytes(bytes: &[u8]) -> BigInt
pub fn to_decimal(&self, decimals: u64) -> BigDecimal
pub fn absolute(&self) -> BigInt
pub fn div_rem(&self, other: &BigInt) -> (BigInt, BigInt)
Trait Implementations§
Source§impl Add<BigDecimal> for BigInt
impl Add<BigDecimal> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
+
operator.Source§fn add(self, other: BigDecimal) -> BigDecimal
fn add(self, other: BigDecimal) -> BigDecimal
Performs the
+
operation. Read moreSource§impl Add<BigInt> for f32
impl Add<BigInt> for f32
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
+
operator.Source§impl Add<BigInt> for f64
impl Add<BigInt> for f64
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
+
operator.Source§impl Add<f32> for BigInt
impl Add<f32> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
+
operator.Source§impl Add<f64> for BigInt
impl Add<f64> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
+
operator.Source§impl BitAndAssign<&BigInt> for BigInt
impl BitAndAssign<&BigInt> for BigInt
Source§fn bitand_assign(&mut self, rhs: &BigInt)
fn bitand_assign(&mut self, rhs: &BigInt)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<i128> for BigInt
impl BitAndAssign<i128> for BigInt
Source§fn bitand_assign(&mut self, rhs: i128)
fn bitand_assign(&mut self, rhs: i128)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<i16> for BigInt
impl BitAndAssign<i16> for BigInt
Source§fn bitand_assign(&mut self, rhs: i16)
fn bitand_assign(&mut self, rhs: i16)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<i32> for BigInt
impl BitAndAssign<i32> for BigInt
Source§fn bitand_assign(&mut self, rhs: i32)
fn bitand_assign(&mut self, rhs: i32)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<i64> for BigInt
impl BitAndAssign<i64> for BigInt
Source§fn bitand_assign(&mut self, rhs: i64)
fn bitand_assign(&mut self, rhs: i64)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<i8> for BigInt
impl BitAndAssign<i8> for BigInt
Source§fn bitand_assign(&mut self, rhs: i8)
fn bitand_assign(&mut self, rhs: i8)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<isize> for BigInt
impl BitAndAssign<isize> for BigInt
Source§fn bitand_assign(&mut self, rhs: isize)
fn bitand_assign(&mut self, rhs: isize)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<u128> for BigInt
impl BitAndAssign<u128> for BigInt
Source§fn bitand_assign(&mut self, rhs: u128)
fn bitand_assign(&mut self, rhs: u128)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<u16> for BigInt
impl BitAndAssign<u16> for BigInt
Source§fn bitand_assign(&mut self, rhs: u16)
fn bitand_assign(&mut self, rhs: u16)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<u32> for BigInt
impl BitAndAssign<u32> for BigInt
Source§fn bitand_assign(&mut self, rhs: u32)
fn bitand_assign(&mut self, rhs: u32)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<u64> for BigInt
impl BitAndAssign<u64> for BigInt
Source§fn bitand_assign(&mut self, rhs: u64)
fn bitand_assign(&mut self, rhs: u64)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<u8> for BigInt
impl BitAndAssign<u8> for BigInt
Source§fn bitand_assign(&mut self, rhs: u8)
fn bitand_assign(&mut self, rhs: u8)
Performs the
&=
operation. Read moreSource§impl BitAndAssign<usize> for BigInt
impl BitAndAssign<usize> for BigInt
Source§fn bitand_assign(&mut self, rhs: usize)
fn bitand_assign(&mut self, rhs: usize)
Performs the
&=
operation. Read moreSource§impl BitAndAssign for BigInt
impl BitAndAssign for BigInt
Source§fn bitand_assign(&mut self, rhs: BigInt)
fn bitand_assign(&mut self, rhs: BigInt)
Performs the
&=
operation. Read moreSource§impl BitOrAssign<&BigInt> for BigInt
impl BitOrAssign<&BigInt> for BigInt
Source§fn bitor_assign(&mut self, rhs: &BigInt)
fn bitor_assign(&mut self, rhs: &BigInt)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<i128> for BigInt
impl BitOrAssign<i128> for BigInt
Source§fn bitor_assign(&mut self, rhs: i128)
fn bitor_assign(&mut self, rhs: i128)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<i16> for BigInt
impl BitOrAssign<i16> for BigInt
Source§fn bitor_assign(&mut self, rhs: i16)
fn bitor_assign(&mut self, rhs: i16)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<i32> for BigInt
impl BitOrAssign<i32> for BigInt
Source§fn bitor_assign(&mut self, rhs: i32)
fn bitor_assign(&mut self, rhs: i32)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<i64> for BigInt
impl BitOrAssign<i64> for BigInt
Source§fn bitor_assign(&mut self, rhs: i64)
fn bitor_assign(&mut self, rhs: i64)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<i8> for BigInt
impl BitOrAssign<i8> for BigInt
Source§fn bitor_assign(&mut self, rhs: i8)
fn bitor_assign(&mut self, rhs: i8)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<isize> for BigInt
impl BitOrAssign<isize> for BigInt
Source§fn bitor_assign(&mut self, rhs: isize)
fn bitor_assign(&mut self, rhs: isize)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<u128> for BigInt
impl BitOrAssign<u128> for BigInt
Source§fn bitor_assign(&mut self, rhs: u128)
fn bitor_assign(&mut self, rhs: u128)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<u16> for BigInt
impl BitOrAssign<u16> for BigInt
Source§fn bitor_assign(&mut self, rhs: u16)
fn bitor_assign(&mut self, rhs: u16)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<u32> for BigInt
impl BitOrAssign<u32> for BigInt
Source§fn bitor_assign(&mut self, rhs: u32)
fn bitor_assign(&mut self, rhs: u32)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<u64> for BigInt
impl BitOrAssign<u64> for BigInt
Source§fn bitor_assign(&mut self, rhs: u64)
fn bitor_assign(&mut self, rhs: u64)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<u8> for BigInt
impl BitOrAssign<u8> for BigInt
Source§fn bitor_assign(&mut self, rhs: u8)
fn bitor_assign(&mut self, rhs: u8)
Performs the
|=
operation. Read moreSource§impl BitOrAssign<usize> for BigInt
impl BitOrAssign<usize> for BigInt
Source§fn bitor_assign(&mut self, rhs: usize)
fn bitor_assign(&mut self, rhs: usize)
Performs the
|=
operation. Read moreSource§impl BitOrAssign for BigInt
impl BitOrAssign for BigInt
Source§fn bitor_assign(&mut self, rhs: BigInt)
fn bitor_assign(&mut self, rhs: BigInt)
Performs the
|=
operation. Read moreSource§impl BitXorAssign<&BigInt> for BigInt
impl BitXorAssign<&BigInt> for BigInt
Source§fn bitxor_assign(&mut self, rhs: &BigInt)
fn bitxor_assign(&mut self, rhs: &BigInt)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<i128> for BigInt
impl BitXorAssign<i128> for BigInt
Source§fn bitxor_assign(&mut self, rhs: i128)
fn bitxor_assign(&mut self, rhs: i128)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<i16> for BigInt
impl BitXorAssign<i16> for BigInt
Source§fn bitxor_assign(&mut self, rhs: i16)
fn bitxor_assign(&mut self, rhs: i16)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<i32> for BigInt
impl BitXorAssign<i32> for BigInt
Source§fn bitxor_assign(&mut self, rhs: i32)
fn bitxor_assign(&mut self, rhs: i32)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<i64> for BigInt
impl BitXorAssign<i64> for BigInt
Source§fn bitxor_assign(&mut self, rhs: i64)
fn bitxor_assign(&mut self, rhs: i64)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<i8> for BigInt
impl BitXorAssign<i8> for BigInt
Source§fn bitxor_assign(&mut self, rhs: i8)
fn bitxor_assign(&mut self, rhs: i8)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<isize> for BigInt
impl BitXorAssign<isize> for BigInt
Source§fn bitxor_assign(&mut self, rhs: isize)
fn bitxor_assign(&mut self, rhs: isize)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<u128> for BigInt
impl BitXorAssign<u128> for BigInt
Source§fn bitxor_assign(&mut self, rhs: u128)
fn bitxor_assign(&mut self, rhs: u128)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<u16> for BigInt
impl BitXorAssign<u16> for BigInt
Source§fn bitxor_assign(&mut self, rhs: u16)
fn bitxor_assign(&mut self, rhs: u16)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<u32> for BigInt
impl BitXorAssign<u32> for BigInt
Source§fn bitxor_assign(&mut self, rhs: u32)
fn bitxor_assign(&mut self, rhs: u32)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<u64> for BigInt
impl BitXorAssign<u64> for BigInt
Source§fn bitxor_assign(&mut self, rhs: u64)
fn bitxor_assign(&mut self, rhs: u64)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<u8> for BigInt
impl BitXorAssign<u8> for BigInt
Source§fn bitxor_assign(&mut self, rhs: u8)
fn bitxor_assign(&mut self, rhs: u8)
Performs the
^=
operation. Read moreSource§impl BitXorAssign<usize> for BigInt
impl BitXorAssign<usize> for BigInt
Source§fn bitxor_assign(&mut self, rhs: usize)
fn bitxor_assign(&mut self, rhs: usize)
Performs the
^=
operation. Read moreSource§impl BitXorAssign for BigInt
impl BitXorAssign for BigInt
Source§fn bitxor_assign(&mut self, rhs: BigInt)
fn bitxor_assign(&mut self, rhs: BigInt)
Performs the
^=
operation. Read moreSource§impl Div<BigDecimal> for BigInt
impl Div<BigDecimal> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
/
operator.Source§fn div(self, other: BigDecimal) -> BigDecimal
fn div(self, other: BigDecimal) -> BigDecimal
Performs the
/
operation. Read moreSource§impl Div<BigInt> for f32
impl Div<BigInt> for f32
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
/
operator.Source§impl Div<BigInt> for f64
impl Div<BigInt> for f64
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
/
operator.Source§impl Div<f32> for BigInt
impl Div<f32> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
/
operator.Source§impl Div<f64> for BigInt
impl Div<f64> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
/
operator.Source§impl From<BigInt> for BigDecimal
impl From<BigInt> for BigDecimal
Source§impl Into<BigDecimal> for &BigInt
impl Into<BigDecimal> for &BigInt
Source§fn into(self) -> BigDecimal
fn into(self) -> BigDecimal
Converts this type into the (usually inferred) input type.
Source§impl Mul<BigDecimal> for BigInt
impl Mul<BigDecimal> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
*
operator.Source§fn mul(self, other: BigDecimal) -> BigDecimal
fn mul(self, other: BigDecimal) -> BigDecimal
Performs the
*
operation. Read moreSource§impl Mul<BigInt> for f32
impl Mul<BigInt> for f32
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
*
operator.Source§impl Mul<BigInt> for f64
impl Mul<BigInt> for f64
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
*
operator.Source§impl Mul<f32> for BigInt
impl Mul<f32> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
*
operator.Source§impl Mul<f64> for BigInt
impl Mul<f64> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
*
operator.Source§impl Ord for BigInt
impl Ord for BigInt
Source§impl PartialOrd for BigInt
impl PartialOrd for BigInt
Source§impl ShlAssign<i128> for BigInt
impl ShlAssign<i128> for BigInt
Source§fn shl_assign(&mut self, rhs: i128)
fn shl_assign(&mut self, rhs: i128)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<i16> for BigInt
impl ShlAssign<i16> for BigInt
Source§fn shl_assign(&mut self, rhs: i16)
fn shl_assign(&mut self, rhs: i16)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<i32> for BigInt
impl ShlAssign<i32> for BigInt
Source§fn shl_assign(&mut self, rhs: i32)
fn shl_assign(&mut self, rhs: i32)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<i64> for BigInt
impl ShlAssign<i64> for BigInt
Source§fn shl_assign(&mut self, rhs: i64)
fn shl_assign(&mut self, rhs: i64)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<i8> for BigInt
impl ShlAssign<i8> for BigInt
Source§fn shl_assign(&mut self, rhs: i8)
fn shl_assign(&mut self, rhs: i8)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<isize> for BigInt
impl ShlAssign<isize> for BigInt
Source§fn shl_assign(&mut self, rhs: isize)
fn shl_assign(&mut self, rhs: isize)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<u128> for BigInt
impl ShlAssign<u128> for BigInt
Source§fn shl_assign(&mut self, rhs: u128)
fn shl_assign(&mut self, rhs: u128)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<u16> for BigInt
impl ShlAssign<u16> for BigInt
Source§fn shl_assign(&mut self, rhs: u16)
fn shl_assign(&mut self, rhs: u16)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<u32> for BigInt
impl ShlAssign<u32> for BigInt
Source§fn shl_assign(&mut self, rhs: u32)
fn shl_assign(&mut self, rhs: u32)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<u64> for BigInt
impl ShlAssign<u64> for BigInt
Source§fn shl_assign(&mut self, rhs: u64)
fn shl_assign(&mut self, rhs: u64)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<u8> for BigInt
impl ShlAssign<u8> for BigInt
Source§fn shl_assign(&mut self, rhs: u8)
fn shl_assign(&mut self, rhs: u8)
Performs the
<<=
operation. Read moreSource§impl ShlAssign<usize> for BigInt
impl ShlAssign<usize> for BigInt
Source§fn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
Performs the
<<=
operation. Read moreSource§impl ShrAssign<i128> for BigInt
impl ShrAssign<i128> for BigInt
Source§fn shr_assign(&mut self, rhs: i128)
fn shr_assign(&mut self, rhs: i128)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<i16> for BigInt
impl ShrAssign<i16> for BigInt
Source§fn shr_assign(&mut self, rhs: i16)
fn shr_assign(&mut self, rhs: i16)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<i32> for BigInt
impl ShrAssign<i32> for BigInt
Source§fn shr_assign(&mut self, rhs: i32)
fn shr_assign(&mut self, rhs: i32)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<i64> for BigInt
impl ShrAssign<i64> for BigInt
Source§fn shr_assign(&mut self, rhs: i64)
fn shr_assign(&mut self, rhs: i64)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<i8> for BigInt
impl ShrAssign<i8> for BigInt
Source§fn shr_assign(&mut self, rhs: i8)
fn shr_assign(&mut self, rhs: i8)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<isize> for BigInt
impl ShrAssign<isize> for BigInt
Source§fn shr_assign(&mut self, rhs: isize)
fn shr_assign(&mut self, rhs: isize)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<u128> for BigInt
impl ShrAssign<u128> for BigInt
Source§fn shr_assign(&mut self, rhs: u128)
fn shr_assign(&mut self, rhs: u128)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<u16> for BigInt
impl ShrAssign<u16> for BigInt
Source§fn shr_assign(&mut self, rhs: u16)
fn shr_assign(&mut self, rhs: u16)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<u32> for BigInt
impl ShrAssign<u32> for BigInt
Source§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<u64> for BigInt
impl ShrAssign<u64> for BigInt
Source§fn shr_assign(&mut self, rhs: u64)
fn shr_assign(&mut self, rhs: u64)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<u8> for BigInt
impl ShrAssign<u8> for BigInt
Source§fn shr_assign(&mut self, rhs: u8)
fn shr_assign(&mut self, rhs: u8)
Performs the
>>=
operation. Read moreSource§impl ShrAssign<usize> for BigInt
impl ShrAssign<usize> for BigInt
Source§fn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
Performs the
>>=
operation. Read moreSource§impl StoreGet<BigInt> for StoreGetBigInt
impl StoreGet<BigInt> for StoreGetBigInt
fn new(idx: u32) -> Self
fn get_at<K: AsRef<str>>(&self, ord: u64, key: K) -> Option<BigInt>
fn get_last<K: AsRef<str>>(&self, key: K) -> Option<BigInt>
fn get_first<K: AsRef<str>>(&self, key: K) -> Option<BigInt>
fn has_at<K: AsRef<str>>(&self, ord: u64, key: K) -> bool
fn has_last<K: AsRef<str>>(&self, key: K) -> bool
fn has_first<K: AsRef<str>>(&self, key: K) -> bool
Source§impl StoreSet<BigInt> for StoreSetBigInt
impl StoreSet<BigInt> for StoreSetBigInt
Source§impl StoreSetIfNotExists<BigInt> for StoreSetIfNotExistsBigInt
impl StoreSetIfNotExists<BigInt> for StoreSetIfNotExistsBigInt
Source§impl StoreSetSum<BigInt> for StoreSetSumBigInt
impl StoreSetSum<BigInt> for StoreSetSumBigInt
Source§impl Sub<BigDecimal> for BigInt
impl Sub<BigDecimal> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
-
operator.Source§fn sub(self, other: BigDecimal) -> BigDecimal
fn sub(self, other: BigDecimal) -> BigDecimal
Performs the
-
operation. Read moreSource§impl Sub<BigInt> for f32
impl Sub<BigInt> for f32
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
-
operator.Source§impl Sub<BigInt> for f64
impl Sub<BigInt> for f64
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
-
operator.Source§impl Sub<f32> for BigInt
impl Sub<f32> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
-
operator.Source§impl Sub<f64> for BigInt
impl Sub<f64> for BigInt
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
-
operator.impl Eq for BigInt
impl StructuralPartialEq for BigInt
Auto Trait Implementations§
impl Freeze for BigInt
impl RefUnwindSafe for BigInt
impl Send for BigInt
impl Sync for BigInt
impl Unpin for BigInt
impl UnwindSafe for BigInt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more