pub struct BigInt { /* private fields */ }Expand description
Signed multiprecision integer used by later public-key helpers.
Implementations§
Source§impl BigInt
impl BigInt
Sourcepub fn from_parts(sign: Sign, magnitude: BigUint) -> Self
pub fn from_parts(sign: Sign, magnitude: BigUint) -> Self
Construct from an explicit sign and magnitude.
Sourcepub fn from_biguint(magnitude: BigUint) -> Self
pub fn from_biguint(magnitude: BigUint) -> Self
Construct a non-negative signed integer from an unsigned value.
Sourcepub fn mul_biguint_ref(&self, factor: &BigUint) -> Self
pub fn mul_biguint_ref(&self, factor: &BigUint) -> Self
Return self * factor for a non-negative factor.
Sourcepub fn modulo_positive(&self, modulus: &BigUint) -> BigUint
pub fn modulo_positive(&self, modulus: &BigUint) -> BigUint
Reduce modulo a positive modulus and return the least non-negative residue.
§Panics
Panics if modulus == 0.
Trait Implementations§
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 UnsafeUnpin 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