pub struct BigInt { /* private fields */ }
Expand description
A arbitrarily sized integer type.
Implementationsยง
sourceยงimpl BigInt
impl BigInt
sourcepub fn from_signed_bytes_le(bytes: impl AsRef<[u8]>) -> Self
pub fn from_signed_bytes_le(bytes: impl AsRef<[u8]>) -> Self
Creates a new big integer value from it signed little-endian reprensentation. Unsigned integers need to ensure that the most significant bit is not set.
sourcepub fn divided_by(&self, rhs: &Self) -> Self
pub fn divided_by(&self, rhs: &Self) -> Self
Returns the division of two big integers.
sourcepub fn divided_by_decimal(&self, rhs: &BigDecimal) -> BigDecimal
pub fn divided_by_decimal(&self, rhs: &BigDecimal) -> BigDecimal
Returns the division of a big integer by a big decimal.
sourcepub fn left_shift(&self, rhs: u8) -> Self
pub fn left_shift(&self, rhs: u8) -> Self
Returns the left shift by rhs
bits.
sourcepub fn right_shift(&self, rhs: u8) -> Self
pub fn right_shift(&self, rhs: u8) -> Self
Returns the arithmetic right shift by rhs
bits.
Trait Implementationsยง
sourceยงimpl Ord for BigInt
impl Ord for BigInt
sourceยงimpl PartialOrd<BigInt> for BigInt
impl PartialOrd<BigInt> for BigInt
1.0.0 ยท sourceยงfn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for BigInt
Auto Trait Implementationsยง
impl RefUnwindSafe for BigInt
impl !Send for BigInt
impl !Sync for BigInt
impl Unpin for BigInt
impl UnwindSafe for BigInt
Blanket Implementationsยง
sourceยงimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.