[−]Struct openssl::bn::BigNumRef  
Reference to a BigNum
Methods
impl BigNumRef[src] 
impl BigNumRefpub fn clear(&mut self)[src] 
pub fn clear(&mut self)Erases the memory used by this BigNum, resetting its value to 0.
This can be used to destroy sensitive data such as keys when they are no longer needed.
OpenSSL documentation at BN_clear
pub fn add_word(&mut self, w: u32) -> Result<(), ErrorStack>[src] 
pub fn add_word(&mut self, w: u32) -> Result<(), ErrorStack>Adds a u32 to self.
OpenSSL documentation at BN_add_word
pub fn sub_word(&mut self, w: u32) -> Result<(), ErrorStack>[src] 
pub fn sub_word(&mut self, w: u32) -> Result<(), ErrorStack>Subtracts a u32 from self.
OpenSSL documentation at BN_sub_word
pub fn mul_word(&mut self, w: u32) -> Result<(), ErrorStack>[src] 
pub fn mul_word(&mut self, w: u32) -> Result<(), ErrorStack>Multiplies a u32 by self.
OpenSSL documentation at BN_mul_word
pub fn div_word(&mut self, w: u32) -> Result<u64, ErrorStack>[src] 
pub fn div_word(&mut self, w: u32) -> Result<u64, ErrorStack>Divides self by a u32, returning the remainder.
OpenSSL documentation at BN_div_word
pub fn mod_word(&self, w: u32) -> Result<u64, ErrorStack>[src] 
pub fn mod_word(&self, w: u32) -> Result<u64, ErrorStack>Returns the result of self modulo w.
OpenSSL documentation at BN_mod_word
pub fn rand_range(&self, rnd: &mut BigNumRef) -> Result<(), ErrorStack>[src] 
pub fn rand_range(&self, rnd: &mut BigNumRef) -> Result<(), ErrorStack>Places a cryptographically-secure pseudo-random nonnegative
number less than self in rnd.
OpenSSL documentation at BN_rand_range
pub fn pseudo_rand_range(&self, rnd: &mut BigNumRef) -> Result<(), ErrorStack>[src] 
pub fn pseudo_rand_range(&self, rnd: &mut BigNumRef) -> Result<(), ErrorStack>The cryptographically weak counterpart to rand_in_range.
OpenSSL documentation at BN_pseudo_rand_range
pub fn set_bit(&mut self, n: i32) -> Result<(), ErrorStack>[src] 
pub fn set_bit(&mut self, n: i32) -> Result<(), ErrorStack>Sets bit n. Equivalent to self |= (1 << n).
When setting a bit outside of self, it is expanded.
OpenSSL documentation at BN_set_bit
pub fn clear_bit(&mut self, n: i32) -> Result<(), ErrorStack>[src] 
pub fn clear_bit(&mut self, n: i32) -> Result<(), ErrorStack>Clears bit n, setting it to 0. Equivalent to self &= ~(1 << n).
When clearing a bit outside of self, an error is returned.
OpenSSL documentation at BN_clear_bit
pub fn is_bit_set(&self, n: i32) -> bool[src] 
pub fn is_bit_set(&self, n: i32) -> boolReturns true if the nth bit of self is set to 1, false otherwise.
OpenSSL documentation at BN_is_bit_set
pub fn mask_bits(&mut self, n: i32) -> Result<(), ErrorStack>[src] 
pub fn mask_bits(&mut self, n: i32) -> Result<(), ErrorStack>Truncates self to the lowest n bits.
An error occurs if self is already shorter than n bits.
OpenSSL documentation at BN_mask_bits
pub fn lshift1(&mut self, a: &BigNumRef) -> Result<(), ErrorStack>[src] 
pub fn lshift1(&mut self, a: &BigNumRef) -> Result<(), ErrorStack>Places a << 1 in self.  Equivalent to self * 2.
OpenSSL documentation at BN_lshift1
pub fn rshift1(&mut self, a: &BigNumRef) -> Result<(), ErrorStack>[src] 
pub fn rshift1(&mut self, a: &BigNumRef) -> Result<(), ErrorStack>Places a >> 1 in self. Equivalent to self / 2.
OpenSSL documentation at BN_rshift1
pub fn checked_add(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef
) -> Result<(), ErrorStack>[src] 
pub fn checked_add(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef
) -> Result<(), ErrorStack>Places a + b in self.  core::ops::Add is also implemented for BigNumRef.
OpenSSL documentation at BN_add
pub fn checked_sub(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef
) -> Result<(), ErrorStack>[src] 
pub fn checked_sub(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef
) -> Result<(), ErrorStack>Places a - b in self. core::ops::Sub is also implemented for BigNumRef.
OpenSSL documentation at BN_sub
pub fn lshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack>[src] 
pub fn lshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack>Places a << n in self.  Equivalent to a * 2 ^ n.
OpenSSL documentation at BN_lshift
pub fn rshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack>[src] 
pub fn rshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack>Places a >> n in self. Equivalent to a / 2 ^ n.
OpenSSL documentation at BN_rshift
pub fn to_owned(&self) -> Result<BigNum, ErrorStack>[src] 
pub fn to_owned(&self) -> Result<BigNum, ErrorStack>Creates a new BigNum with the same value.
OpenSSL documentation at BN_dup
pub fn set_negative(&mut self, negative: bool)[src] 
pub fn set_negative(&mut self, negative: bool)Sets the sign of self.  Pass true to set self to a negative.  False sets
self positive.
pub fn ucmp(&self, oth: &BigNumRef) -> Ordering[src] 
pub fn ucmp(&self, oth: &BigNumRef) -> OrderingCompare the absolute values of self and oth.
OpenSSL documentation at BN_ucmp
Examples
let s = -BigNum::from_u32(8).unwrap(); let o = BigNum::from_u32(8).unwrap(); assert_eq!(s.ucmp(&o), Ordering::Equal);
pub fn is_negative(&self) -> bool[src] 
pub fn is_negative(&self) -> boolReturns true if self is negative.
pub fn num_bits(&self) -> i32[src] 
pub fn num_bits(&self) -> i32Returns the number of significant bits in self.
OpenSSL documentation at BN_num_bits
pub fn num_bytes(&self) -> i32[src] 
pub fn num_bytes(&self) -> i32Returns the size of self in bytes. Implemented natively.
pub fn rand(
    &mut self, 
    bits: i32, 
    msb: MsbOption, 
    odd: bool
) -> Result<(), ErrorStack>[src] 
pub fn rand(
    &mut self, 
    bits: i32, 
    msb: MsbOption, 
    odd: bool
) -> Result<(), ErrorStack>Generates a cryptographically strong pseudo-random BigNum, placing it in self.
Parameters
- bits: Length of the number in bits.
- msb: The desired properties of the most significant bit. See- constants.
- odd: If- true, the generated number will be odd.
Examples
use openssl::bn::{BigNum, MsbOption}; use openssl::error::ErrorStack; fn generate_random() -> Result< BigNum, ErrorStack > { let mut big = BigNum::new()?; // Generates a 128-bit odd random number big.rand(128, MsbOption::MAYBE_ZERO, true); Ok((big)) }
OpenSSL documentation at BN_rand
pub fn pseudo_rand(
    &mut self, 
    bits: i32, 
    msb: MsbOption, 
    odd: bool
) -> Result<(), ErrorStack>[src] 
pub fn pseudo_rand(
    &mut self, 
    bits: i32, 
    msb: MsbOption, 
    odd: bool
) -> Result<(), ErrorStack>The cryptographically weak counterpart to rand.  Not suitable for key generation.
OpenSSL documentation at BN_psuedo_rand
pub fn generate_prime(
    &mut self, 
    bits: i32, 
    safe: bool, 
    add: Option<&BigNumRef>, 
    rem: Option<&BigNumRef>
) -> Result<(), ErrorStack>[src] 
pub fn generate_prime(
    &mut self, 
    bits: i32, 
    safe: bool, 
    add: Option<&BigNumRef>, 
    rem: Option<&BigNumRef>
) -> Result<(), ErrorStack>Generates a prime number, placing it in self.
Parameters
- bits: The length of the prime in bits (lower bound).
- safe: If true, returns a "safe" prime- pso that- (p-1)/2is also prime.
- add/- rem: If- addis set to- Some(add),- p % add == remwill hold, where- pis the generated prime and- remis- 1if not specified (- None).
Examples
use openssl::bn::BigNum; use openssl::error::ErrorStack; fn generate_weak_prime() -> Result< BigNum, ErrorStack > { let mut big = BigNum::new()?; // Generates a 128-bit simple prime number big.generate_prime(128, false, None, None); Ok((big)) }
OpenSSL documentation at BN_generate_prime_ex
pub fn checked_mul(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn checked_mul(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a * b in self.
core::ops::Mul is also implemented for BigNumRef.
OpenSSL documentation at BN_mul
pub fn checked_div(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn checked_div(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a / b in self. The remainder is discarded.
core::ops::Div is also implemented for BigNumRef.
OpenSSL documentation at BN_div
pub fn checked_rem(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn checked_rem(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a % b in self.
OpenSSL documentation at BN_div
pub fn div_rem(
    &mut self, 
    rem: &mut BigNumRef, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn div_rem(
    &mut self, 
    rem: &mut BigNumRef, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a / b in self and a % b in rem.
OpenSSL documentation at BN_div
pub fn sqr(
    &mut self, 
    a: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn sqr(
    &mut self, 
    a: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a² in self.
OpenSSL documentation at BN_sqr
pub fn nnmod(
    &mut self, 
    a: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn nnmod(
    &mut self, 
    a: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a mod m in self.  As opposed to div_rem
the result is non-negative.
OpenSSL documentation at BN_nnmod
pub fn mod_add(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn mod_add(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of (a + b) mod m in self.
OpenSSL documentation at BN_mod_add
pub fn mod_sub(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn mod_sub(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of (a - b) mod m in self.
OpenSSL documentation at BN_mod_sub
pub fn mod_mul(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn mod_mul(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of (a * b) mod m in self.
OpenSSL documentation at BN_mod_mul
pub fn mod_sqr(
    &mut self, 
    a: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn mod_sqr(
    &mut self, 
    a: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a² mod m in self.
OpenSSL documentation at BN_mod_sqr
pub fn exp(
    &mut self, 
    a: &BigNumRef, 
    p: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn exp(
    &mut self, 
    a: &BigNumRef, 
    p: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a^p in self.
OpenSSL documentation at BN_exp
pub fn mod_exp(
    &mut self, 
    a: &BigNumRef, 
    p: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn mod_exp(
    &mut self, 
    a: &BigNumRef, 
    p: &BigNumRef, 
    m: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the result of a^p mod m in self.
OpenSSL documentation at BN_mod_exp
pub fn mod_inverse(
    &mut self, 
    a: &BigNumRef, 
    n: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn mod_inverse(
    &mut self, 
    a: &BigNumRef, 
    n: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the inverse of a modulo n in self.
pub fn gcd(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>[src] 
pub fn gcd(
    &mut self, 
    a: &BigNumRef, 
    b: &BigNumRef, 
    ctx: &mut BigNumContextRef
) -> Result<(), ErrorStack>Places the greatest common denominator of a and b in self.
OpenSSL documentation at BN_gcd
pub fn is_prime(
    &self, 
    checks: i32, 
    ctx: &mut BigNumContextRef
) -> Result<bool, ErrorStack>[src] 
pub fn is_prime(
    &self, 
    checks: i32, 
    ctx: &mut BigNumContextRef
) -> Result<bool, ErrorStack>Checks whether self is prime.
Performs a Miller-Rabin probabilistic primality test with checks iterations.
OpenSSL documentation at BN_is_prime_ex
Return Value
Returns true if self is prime with an error probability of less than 0.25 ^ checks.
pub fn is_prime_fasttest(
    &self, 
    checks: i32, 
    ctx: &mut BigNumContextRef, 
    do_trial_division: bool
) -> Result<bool, ErrorStack>[src] 
pub fn is_prime_fasttest(
    &self, 
    checks: i32, 
    ctx: &mut BigNumContextRef, 
    do_trial_division: bool
) -> Result<bool, ErrorStack>Checks whether self is prime with optional trial division.
If do_trial_division is true, first performs trial division by a number of small primes.
Then, like is_prime, performs a Miller-Rabin probabilistic primality test with checks
iterations.
OpenSSL documentation at BN_is_prime_fasttest_ex
Return Value
Returns true if self is prime with an error probability of less than 0.25 ^ checks.
pub fn to_vec(&self) -> Vec<u8>[src] 
pub fn to_vec(&self) -> Vec<u8>Returns a big-endian byte vector representation of the absolute value of self.
self can be recreated by using from_slice.
let s = -BigNum::from_u32(4543).unwrap(); let r = BigNum::from_u32(4543).unwrap(); let s_vec = s.to_vec(); assert_eq!(BigNum::from_slice(&s_vec).unwrap(), r);
pub fn to_dec_str(&self) -> Result<OpensslString, ErrorStack>[src] 
pub fn to_dec_str(&self) -> Result<OpensslString, ErrorStack>Returns a decimal string representation of self.
let s = -BigNum::from_u32(12345).unwrap(); assert_eq!(&**s.to_dec_str().unwrap(), "-12345");
pub fn to_hex_str(&self) -> Result<OpensslString, ErrorStack>[src] 
pub fn to_hex_str(&self) -> Result<OpensslString, ErrorStack>Returns a hexadecimal string representation of self.
let s = -BigNum::from_u32(0x99ff).unwrap(); assert_eq!(&**s.to_hex_str().unwrap(), "-99FF");
pub fn to_asn1_integer(&self) -> Result<Asn1Integer, ErrorStack>[src] 
pub fn to_asn1_integer(&self) -> Result<Asn1Integer, ErrorStack>Returns an Asn1Integer containing the value of self.
Trait Implementations
impl Sync for BigNumRef[src] 
impl Sync for BigNumRefimpl Eq for BigNumRef[src] 
impl Eq for BigNumRefimpl AsRef<BigNumRef> for BigNum
impl AsRef<BigNumRef> for BigNumimpl PartialOrd<BigNumRef> for BigNumRef[src] 
impl PartialOrd<BigNumRef> for BigNumReffn partial_cmp(&self, oth: &BigNumRef) -> Option<Ordering>[src] 
fn partial_cmp(&self, oth: &BigNumRef) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialOrd<BigNum> for BigNumRef[src] 
impl PartialOrd<BigNum> for BigNumReffn partial_cmp(&self, oth: &BigNum) -> Option<Ordering>[src] 
fn partial_cmp(&self, oth: &BigNum) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialOrd<BigNumRef> for BigNum[src] 
impl PartialOrd<BigNumRef> for BigNumfn partial_cmp(&self, oth: &BigNumRef) -> Option<Ordering>[src] 
fn partial_cmp(&self, oth: &BigNumRef) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialEq<BigNumRef> for BigNumRef[src] 
impl PartialEq<BigNumRef> for BigNumReffn eq(&self, oth: &BigNumRef) -> bool[src] 
fn eq(&self, oth: &BigNumRef) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<BigNum> for BigNumRef[src] 
impl PartialEq<BigNum> for BigNumReffn eq(&self, oth: &BigNum) -> bool[src] 
fn eq(&self, oth: &BigNum) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<BigNumRef> for BigNum[src] 
impl PartialEq<BigNumRef> for BigNumfn eq(&self, oth: &BigNumRef) -> bool[src] 
fn eq(&self, oth: &BigNumRef) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src] 
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Send for BigNumRef[src] 
impl Send for BigNumRefimpl Ord for BigNumRef[src] 
impl Ord for BigNumReffn cmp(&self, oth: &BigNumRef) -> Ordering[src] 
fn cmp(&self, oth: &BigNumRef) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src] 
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src] 
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Display for BigNumRef[src] 
impl Display for BigNumReffn fmt(&self, f: &mut Formatter) -> Result[src] 
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Debug for BigNumRef[src] 
impl Debug for BigNumReffn fmt(&self, f: &mut Formatter) -> Result[src] 
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a, 'b> Add<&'b BigNumRef> for &'a BigNumRef[src] 
impl<'a, 'b> Add<&'b BigNumRef> for &'a BigNumReftype Output = BigNum
The resulting type after applying the + operator.
fn add(self, oth: &BigNumRef) -> BigNum[src] 
fn add(self, oth: &BigNumRef) -> BigNumPerforms the + operation.
impl<'a, 'b> Add<&'b BigNum> for &'a BigNumRef[src] 
impl<'a, 'b> Add<&'b BigNum> for &'a BigNumReftype Output = BigNum
The resulting type after applying the + operator.
fn add(self, oth: &BigNum) -> BigNum[src] 
fn add(self, oth: &BigNum) -> BigNumPerforms the + operation.
impl<'a, 'b> Add<&'b BigNumRef> for &'a BigNum[src] 
impl<'a, 'b> Add<&'b BigNumRef> for &'a BigNumtype Output = BigNum
The resulting type after applying the + operator.
fn add(self, oth: &BigNumRef) -> BigNum[src] 
fn add(self, oth: &BigNumRef) -> BigNumPerforms the + operation.
impl<'a, 'b> Sub<&'b BigNumRef> for &'a BigNumRef[src] 
impl<'a, 'b> Sub<&'b BigNumRef> for &'a BigNumReftype Output = BigNum
The resulting type after applying the - operator.
fn sub(self, oth: &BigNumRef) -> BigNum[src] 
fn sub(self, oth: &BigNumRef) -> BigNumPerforms the - operation.
impl<'a, 'b> Sub<&'b BigNum> for &'a BigNumRef[src] 
impl<'a, 'b> Sub<&'b BigNum> for &'a BigNumReftype Output = BigNum
The resulting type after applying the - operator.
fn sub(self, oth: &BigNum) -> BigNum[src] 
fn sub(self, oth: &BigNum) -> BigNumPerforms the - operation.
impl<'a, 'b> Sub<&'b BigNumRef> for &'a BigNum[src] 
impl<'a, 'b> Sub<&'b BigNumRef> for &'a BigNumtype Output = BigNum
The resulting type after applying the - operator.
fn sub(self, oth: &BigNumRef) -> BigNum[src] 
fn sub(self, oth: &BigNumRef) -> BigNumPerforms the - operation.
impl<'a, 'b> Mul<&'b BigNumRef> for &'a BigNumRef[src] 
impl<'a, 'b> Mul<&'b BigNumRef> for &'a BigNumReftype Output = BigNum
The resulting type after applying the * operator.
fn mul(self, oth: &BigNumRef) -> BigNum[src] 
fn mul(self, oth: &BigNumRef) -> BigNumPerforms the * operation.
impl<'a, 'b> Mul<&'b BigNum> for &'a BigNumRef[src] 
impl<'a, 'b> Mul<&'b BigNum> for &'a BigNumReftype Output = BigNum
The resulting type after applying the * operator.
fn mul(self, oth: &BigNum) -> BigNum[src] 
fn mul(self, oth: &BigNum) -> BigNumPerforms the * operation.
impl<'a, 'b> Mul<&'b BigNumRef> for &'a BigNum[src] 
impl<'a, 'b> Mul<&'b BigNumRef> for &'a BigNumtype Output = BigNum
The resulting type after applying the * operator.
fn mul(self, oth: &BigNumRef) -> BigNum[src] 
fn mul(self, oth: &BigNumRef) -> BigNumPerforms the * operation.
impl<'a, 'b> Div<&'b BigNumRef> for &'a BigNumRef[src] 
impl<'a, 'b> Div<&'b BigNumRef> for &'a BigNumReftype Output = BigNum
The resulting type after applying the / operator.
fn div(self, oth: &'b BigNumRef) -> BigNum[src] 
fn div(self, oth: &'b BigNumRef) -> BigNumPerforms the / operation.
impl<'a, 'b> Div<&'b BigNum> for &'a BigNumRef[src] 
impl<'a, 'b> Div<&'b BigNum> for &'a BigNumReftype Output = BigNum
The resulting type after applying the / operator.
fn div(self, oth: &BigNum) -> BigNum[src] 
fn div(self, oth: &BigNum) -> BigNumPerforms the / operation.
impl<'a, 'b> Div<&'b BigNumRef> for &'a BigNum[src] 
impl<'a, 'b> Div<&'b BigNumRef> for &'a BigNumtype Output = BigNum
The resulting type after applying the / operator.
fn div(self, oth: &BigNumRef) -> BigNum[src] 
fn div(self, oth: &BigNumRef) -> BigNumPerforms the / operation.
impl<'a, 'b> Rem<&'b BigNumRef> for &'a BigNumRef[src] 
impl<'a, 'b> Rem<&'b BigNumRef> for &'a BigNumReftype Output = BigNum
The resulting type after applying the % operator.
fn rem(self, oth: &'b BigNumRef) -> BigNum[src] 
fn rem(self, oth: &'b BigNumRef) -> BigNumPerforms the % operation.
impl<'a, 'b> Rem<&'b BigNum> for &'a BigNumRef[src] 
impl<'a, 'b> Rem<&'b BigNum> for &'a BigNumReftype Output = BigNum
The resulting type after applying the % operator.
fn rem(self, oth: &BigNum) -> BigNum[src] 
fn rem(self, oth: &BigNum) -> BigNumPerforms the % operation.
impl<'a, 'b> Rem<&'b BigNumRef> for &'a BigNum[src] 
impl<'a, 'b> Rem<&'b BigNumRef> for &'a BigNumtype Output = BigNum
The resulting type after applying the % operator.
fn rem(self, oth: &BigNumRef) -> BigNum[src] 
fn rem(self, oth: &BigNumRef) -> BigNumPerforms the % operation.
impl<'a> Neg for &'a BigNumRef[src] 
impl<'a> Neg for &'a BigNumReftype Output = BigNum
The resulting type after applying the - operator.
fn neg(self) -> BigNum[src] 
fn neg(self) -> BigNumPerforms the unary - operation.
impl<'a> Shl<i32> for &'a BigNumRef[src] 
impl<'a> Shl<i32> for &'a BigNumReftype Output = BigNum
The resulting type after applying the << operator.
fn shl(self, n: i32) -> BigNum[src] 
fn shl(self, n: i32) -> BigNumPerforms the << operation.
impl<'a> Shr<i32> for &'a BigNumRef[src] 
impl<'a> Shr<i32> for &'a BigNumReftype Output = BigNum
The resulting type after applying the >> operator.
fn shr(self, n: i32) -> BigNum[src] 
fn shr(self, n: i32) -> BigNumPerforms the >> operation.
impl Borrow<BigNumRef> for BigNum
impl Borrow<BigNumRef> for BigNumimpl ForeignTypeRef for BigNumRef
impl ForeignTypeRef for BigNumReftype CType = BIGNUM
The raw C type.
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self[src] 
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a SelfConstructs a shared instance of this type from its raw type.
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self[src] 
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut SelfConstructs a mutable reference of this type from its raw type.
fn as_ptr(&self) -> *mut Self::CType[src] 
fn as_ptr(&self) -> *mut Self::CTypeReturns a raw pointer to the wrapped value.
Blanket Implementations
impl<T> From for T[src] 
impl<T> From for Timpl<T, U> Into for T where
    U: From<T>, [src] 
impl<T, U> Into for T where
    U: From<T>, impl<T> ToString for T where
    T: Display + ?Sized, [src] 
impl<T> ToString for T where
    T: Display + ?Sized, impl<T, U> TryFrom for T where
    T: From<U>, [src] 
impl<T, U> TryFrom for T where
    T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src] 
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
    T: ?Sized, [src] 
impl<T> Borrow for T where
    T: ?Sized, impl<T> BorrowMut for T where
    T: ?Sized, [src] 
impl<T> BorrowMut for T where
    T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src] 
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
    U: TryFrom<T>, [src] 
impl<T, U> TryInto for T where
    U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src] 
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
    T: 'static + ?Sized, [src] 
impl<T> Any for T where
    T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src] 
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API.  (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more