pub struct Integer(/* private fields */);Implementations§
Source§impl Integer
impl Integer
pub fn new() -> Self
pub fn from_str_radix(s: &str, radix: u32) -> Result<Self, ParseBigIntError>
pub fn to_u8(&self) -> Option<u8>
pub fn to_u32(&self) -> Option<u32>
pub fn to_u64(&self) -> Option<u64>
pub fn to_usize(&self) -> Option<usize>
pub fn to_i32(&self) -> Option<i32>
pub fn to_isize(&self) -> Option<isize>
pub fn to_f64(&self) -> f64
pub fn abs(&self) -> Self
pub fn abs_ref(&self) -> Self
pub fn div_rem(&self, other: Self) -> (Self, Self)
pub fn div_rem_ref(&self, other: &Self) -> (Self, Self)
pub fn div_rem_floor(&self, other: Self) -> (Self, Self)
pub fn div_rem_floor_ref(&self, other: &Self) -> (Self, Self)
pub fn mod_u(&self, modulo: u32) -> u32
pub fn is_odd(&self) -> bool
pub fn from_f64(v: f64) -> Option<Self>
pub fn gcd_ref(&self, other: &Self) -> Self
pub fn gcd(&self, other: &Self) -> Self
Trait Implementations§
Source§impl AddAssign<&Integer> for Integer
impl AddAssign<&Integer> for Integer
Source§fn add_assign(&mut self, other: &Integer)
fn add_assign(&mut self, other: &Integer)
Performs the
+= operation. Read moreSource§impl AddAssign<i64> for Integer
impl AddAssign<i64> for Integer
Source§fn add_assign(&mut self, other: i64)
fn add_assign(&mut self, other: i64)
Performs the
+= operation. Read moreSource§impl MulAssign<&Integer> for Integer
impl MulAssign<&Integer> for Integer
Source§fn mul_assign(&mut self, other: &Integer)
fn mul_assign(&mut self, other: &Integer)
Performs the
*= operation. Read moreSource§impl Ord for Integer
impl Ord for Integer
Source§impl PartialOrd<i32> for Integer
impl PartialOrd<i32> for Integer
Source§impl PartialOrd<i64> for Integer
impl PartialOrd<i64> for Integer
Source§impl PartialOrd<isize> for Integer
impl PartialOrd<isize> for Integer
Source§impl PartialOrd<usize> for Integer
impl PartialOrd<usize> for Integer
Source§impl PartialOrd for Integer
impl PartialOrd for Integer
Source§impl ShrAssign<u32> for Integer
impl ShrAssign<u32> for Integer
Source§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
Performs the
>>= operation. Read moreimpl Eq for Integer
impl StructuralPartialEq for Integer
Auto Trait Implementations§
impl Freeze for Integer
impl RefUnwindSafe for Integer
impl Send for Integer
impl Sync for Integer
impl Unpin for Integer
impl UnwindSafe for Integer
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