Files
GopherGate/target/doc/openssl/bn/struct.BigNum.html
2026-02-26 12:00:21 -05:00

400 lines
191 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Dynamically sized large number implementation"><title>BigNum in openssl::bn - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="openssl" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">BigNum</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../openssl/index.html">openssl</a><span class="version">0.10.75</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">BigNum</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.copy_from_slice" title="copy_from_slice">copy_from_slice</a></li><li><a href="#method.from_dec_str" title="from_dec_str">from_dec_str</a></li><li><a href="#method.from_hex_str" title="from_hex_str">from_hex_str</a></li><li><a href="#method.from_slice" title="from_slice">from_slice</a></li><li><a href="#method.from_u32" title="from_u32">from_u32</a></li><li><a href="#method.get_rfc2409_prime_768" title="get_rfc2409_prime_768">get_rfc2409_prime_768</a></li><li><a href="#method.get_rfc2409_prime_1024" title="get_rfc2409_prime_1024">get_rfc2409_prime_1024</a></li><li><a href="#method.get_rfc3526_prime_1536" title="get_rfc3526_prime_1536">get_rfc3526_prime_1536</a></li><li><a href="#method.get_rfc3526_prime_2048" title="get_rfc3526_prime_2048">get_rfc3526_prime_2048</a></li><li><a href="#method.get_rfc3526_prime_3072" title="get_rfc3526_prime_3072">get_rfc3526_prime_3072</a></li><li><a href="#method.get_rfc3526_prime_4096" title="get_rfc3526_prime_4096">get_rfc3526_prime_4096</a></li><li><a href="#method.get_rfc3526_prime_6144" title="get_rfc3526_prime_6144">get_rfc3526_prime_6144</a></li><li><a href="#method.get_rfc3526_prime_8192" title="get_rfc3526_prime_8192">get_rfc3526_prime_8192</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.new_secure" title="new_secure">new_secure</a></li></ul><h3><a href="#deref-methods-BigNumRef">Methods from Deref&lt;<wbr>Target=<wbr>BigNum<wbr>Ref&gt;</a></h3><ul class="block deref-methods"><li><a href="#method.add_word" title="add_word">add_word</a></li><li><a href="#method.checked_add" title="checked_add">checked_add</a></li><li><a href="#method.checked_div" title="checked_div">checked_div</a></li><li><a href="#method.checked_mul" title="checked_mul">checked_mul</a></li><li><a href="#method.checked_rem" title="checked_rem">checked_rem</a></li><li><a href="#method.checked_sub" title="checked_sub">checked_sub</a></li><li><a href="#method.clear" title="clear">clear</a></li><li><a href="#method.clear_bit" title="clear_bit">clear_bit</a></li><li><a href="#method.div_rem" title="div_rem">div_rem</a></li><li><a href="#method.div_word" title="div_word">div_word</a></li><li><a href="#method.exp" title="exp">exp</a></li><li><a href="#method.gcd" title="gcd">gcd</a></li><li><a href="#method.generate_prime" title="generate_prime">generate_prime</a></li><li><a href="#method.is_bit_set" title="is_bit_set">is_bit_set</a></li><li><a href="#method.is_const_time" title="is_const_time">is_const_time</a></li><li><a href="#method.is_even" title="is_even">is_even</a></li><li><a href="#method.is_negative" title="is_negative">is_negative</a></li><li><a href="#method.is_odd" title="is_odd">is_odd</a></li><li><a href="#method.is_prime" title="is_prime">is_prime</a></li><li><a href="#method.is_prime_fasttest" title="is_prime_fasttest">is_prime_fasttest</a></li><li><a href="#method.is_secure" title="is_secure">is_secure</a></li><li><a href="#method.lshift" title="lshift">lshift</a></li><li><a href="#method.lshift1" title="lshift1">lshift1</a></li><li><a href="#method.mask_bits" title="mask_bits">mask_bits</a></li><li><a href="#method.mod_add" title="mod_add">mod_add</a></li><li><a href="#method.mod_exp" title="mod_exp">mod_exp</a></li><li><a href="#method.mod_inverse" title="mod_inverse">mod_inverse</a></li><li><a href="#method.mod_mul" title="mod_mul">mod_mul</a></li><li><a href="#method.mod_sqr" title="mod_sqr">mod_sqr</a></li><li><a href="#method.mod_sqrt" title="mod_sqrt">mod_sqrt</a></li><li><a href="#method.mod_sub" title="mod_sub">mod_sub</a></li><li><a href="#method.mod_word" title="mod_word">mod_word</a></li><li><a href="#method.mul_word" title="mul_word">mul_word</a></li><li><a href="#method.nnmod" title="nnmod">nnmod</a></li><li><a href="#method.num_bits" title="num_bits">num_bits</a></li><li><a href="#method.num_bytes" title="num_bytes">num_bytes</a></li><li><a href="#method.pseudo_rand" title="pseudo_rand">pseudo_rand</a></li><li><a href="#method.pseudo_rand_range" title="pseudo_rand_range">pseudo_rand_range</a></li><li><a href="#method.rand" title="rand">rand</a></li><li><a href="#method.rand_range" title="rand_range">rand_range</a></li><li><a href="#method.rshift" title="rshift">rshift</a></li><li><a href="#method.rshift1" title="rshift1">rshift1</a></li><li><a href="#method.set_bit" title="set_bit">set_bit</a></li><li><a href="#method.set_const_time" title="set_const_time">set_const_time</a></li><li><a href="#method.set_negative" title="set_negative">set_negative</a></li><li><a href="#method.sqr" title="sqr">sqr</a></li><li><a href="#method.sub_word" title="sub_word">sub_word</a></li><li><a href="#method.to_asn1_integer" title="to_asn1_integer">to_asn1_integer</a></li><li><a href="#method.to_dec_str" title="to_dec_str">to_dec_str</a></li><li><a href="#method.to_hex_str" title="to_hex_str">to_hex_str</a></li><li><a href="#method.to_owned" title="to_owned">to_owned</a></li><li><a href="#method.to_vec" title="to_vec">to_vec</a></li><li><a href="#method.to_vec_padded" title="to_vec_padded">to_vec_padded</a></li><li><a href="#method.ucmp" title="ucmp">ucmp</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Add%3C%26BigNum%3E-for-%26BigNum" title="Add&#60;&#38;&#39;b BigNum&#62;">Add&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Add%3C%26BigNum%3E-for-%26BigNumRef" title="Add&#60;&#38;&#39;b BigNum&#62;">Add&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Add%3C%26BigNumRef%3E-for-%26BigNum" title="Add&#60;&#38;&#39;b BigNumRef&#62;">Add&#60;&#38;&#39;b BigNumRef&#62;</a></li><li><a href="#impl-AsRef%3CBigNumRef%3E-for-BigNum" title="AsRef&#60;BigNumRef&#62;">AsRef&#60;BigNumRef&#62;</a></li><li><a href="#impl-Borrow%3CBigNumRef%3E-for-BigNum" title="Borrow&#60;BigNumRef&#62;">Borrow&#60;BigNumRef&#62;</a></li><li><a href="#impl-Debug-for-BigNum" title="Debug">Debug</a></li><li><a href="#impl-Deref-for-BigNum" title="Deref">Deref</a></li><li><a href="#impl-DerefMut-for-BigNum" title="DerefMut">DerefMut</a></li><li><a href="#impl-Display-for-BigNum" title="Display">Display</a></li><li><a href="#impl-Div%3C%26BigNum%3E-for-%26BigNum" title="Div&#60;&#38;&#39;b BigNum&#62;">Div&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Div%3C%26BigNum%3E-for-%26BigNumRef" title="Div&#60;&#38;&#39;b BigNum&#62;">Div&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Div%3C%26BigNumRef%3E-for-%26BigNum" title="Div&#60;&#38;&#39;b BigNumRef&#62;">Div&#60;&#38;&#39;b BigNumRef&#62;</a></li><li><a href="#impl-Drop-for-BigNum" title="Drop">Drop</a></li><li><a href="#impl-Eq-for-BigNum" title="Eq">Eq</a></li><li><a href="#impl-ForeignType-for-BigNum" title="ForeignType">ForeignType</a></li><li><a href="#impl-Mul%3C%26BigNum%3E-for-%26BigNum" title="Mul&#60;&#38;&#39;b BigNum&#62;">Mul&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Mul%3C%26BigNum%3E-for-%26BigNumRef" title="Mul&#60;&#38;&#39;b BigNum&#62;">Mul&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Mul%3C%26BigNumRef%3E-for-%26BigNum" title="Mul&#60;&#38;&#39;b BigNumRef&#62;">Mul&#60;&#38;&#39;b BigNumRef&#62;</a></li><li><a href="#impl-Neg-for-%26BigNum" title="Neg">Neg</a></li><li><a href="#impl-Neg-for-BigNum" title="Neg">Neg</a></li><li><a href="#impl-Ord-for-BigNum" title="Ord">Ord</a></li><li><a href="#impl-PartialEq-for-BigNum" title="PartialEq">PartialEq</a></li><li><a href="#impl-PartialEq%3CBigNum%3E-for-BigNumRef" title="PartialEq&#60;BigNum&#62;">PartialEq&#60;BigNum&#62;</a></li><li><a href="#impl-PartialEq%3CBigNumRef%3E-for-BigNum" title="PartialEq&#60;BigNumRef&#62;">PartialEq&#60;BigNumRef&#62;</a></li><li><a href="#impl-PartialOrd-for-BigNum" title="PartialOrd">PartialOrd</a></li><li><a href="#impl-PartialOrd%3CBigNum%3E-for-BigNumRef" title="PartialOrd&#60;BigNum&#62;">PartialOrd&#60;BigNum&#62;</a></li><li><a href="#impl-PartialOrd%3CBigNumRef%3E-for-BigNum" title="PartialOrd&#60;BigNumRef&#62;">PartialOrd&#60;BigNumRef&#62;</a></li><li><a href="#impl-Rem%3C%26BigNum%3E-for-%26BigNum" title="Rem&#60;&#38;&#39;b BigNum&#62;">Rem&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Rem%3C%26BigNum%3E-for-%26BigNumRef" title="Rem&#60;&#38;&#39;b BigNum&#62;">Rem&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Rem%3C%26BigNumRef%3E-for-%26BigNum" title="Rem&#60;&#38;&#39;b BigNumRef&#62;">Rem&#60;&#38;&#39;b BigNumRef&#62;</a></li><li><a href="#impl-Send-for-BigNum" title="Send">Send</a></li><li><a href="#impl-Shl%3Ci32%3E-for-%26BigNum" title="Shl&#60;i32&#62;">Shl&#60;i32&#62;</a></li><li><a href="#impl-Shr%3Ci32%3E-for-%26BigNum" title="Shr&#60;i32&#62;">Shr&#60;i32&#62;</a></li><li><a href="#impl-Sub%3C%26BigNum%3E-for-%26BigNum" title="Sub&#60;&#38;&#39;b BigNum&#62;">Sub&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Sub%3C%26BigNum%3E-for-%26BigNumRef" title="Sub&#60;&#38;&#39;b BigNum&#62;">Sub&#60;&#38;&#39;b BigNum&#62;</a></li><li><a href="#impl-Sub%3C%26BigNumRef%3E-for-%26BigNum" title="Sub&#60;&#38;&#39;b BigNumRef&#62;">Sub&#60;&#38;&#39;b BigNumRef&#62;</a></li><li><a href="#impl-Sync-for-BigNum" title="Sync">Sync</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-BigNum" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-BigNum" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-BigNum" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-BigNum" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-Receiver-for-P" title="Receiver">Receiver</a></li><li><a href="#impl-ToString-for-T" title="ToString">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In openssl::<wbr>bn</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">openssl</a>::<wbr><a href="index.html">bn</a></div><h1>Struct <span class="struct">BigNum</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/openssl/bn.rs.html#133-165">Source</a> </span></div><pre class="rust item-decl"><code>pub struct BigNum(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Dynamically sized large number implementation</p>
<p>Perform large number mathematics. Create a new BigNum
with <a href="struct.BigNum.html#method.new"><code>new</code></a>. Perform standard mathematics on large numbers using
methods from <a href="struct.BigNum.html#deref-methods"><code>Dref&lt;Target = BigNumRef&gt;</code></a></p>
<p>OpenSSL documentation at <a href="https://docs.openssl.org/master/man3/BN_new/"><code>BN_new</code></a>.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::bn::BigNum;
<span class="kw">let </span>little_big = BigNum::from_u32(std::u32::MAX)<span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(<span class="kw-2">*&amp;</span>little_big.num_bytes(), <span class="number">4</span>);</code></pre></div></div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#939-1151">Source</a><a href="#impl-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#942-948">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new <code>BigNum</code> with the value 0.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_new.html"><code>BN_new</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.new_secure" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#953-959">Source</a><h4 class="code-header">pub fn <a href="#method.new_secure" class="fn">new_secure</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a new secure <code>BigNum</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_secure_new.html"><code>BN_secure_new</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_u32" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#963-967">Source</a><h4 class="code-header">pub fn <a href="#method.from_u32" class="fn">from_u32</a>(n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new <code>BigNum</code> with the given value.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_set_word.html"><code>BN_set_word</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_dec_str" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#971-979">Source</a><h4 class="code-header">pub fn <a href="#method.from_dec_str" class="fn">from_dec_str</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a <code>BigNum</code> from a decimal string.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_dec2bn.html"><code>BN_dec2bn</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_hex_str" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#983-991">Source</a><h4 class="code-header">pub fn <a href="#method.from_hex_str" class="fn">from_hex_str</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a <code>BigNum</code> from a hexadecimal string.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_hex2bn.html"><code>BN_hex2bn</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_rfc2409_prime_768" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1000-1005">Source</a><h4 class="code-header">pub fn <a href="#method.get_rfc2409_prime_768" class="fn">get_rfc2409_prime_768</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a constant used in IKE as defined in <a href="https://tools.ietf.org/html/rfc2409#page-21"><code>RFC 2409</code></a>. This prime number is in
the order of magnitude of <code>2 ^ 768</code>. This number is used during calculated key
exchanges such as Diffie-Hellman. This number is labeled Oakley group id 1.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_rfc2409_prime_768.html"><code>BN_get_rfc2409_prime_768</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_rfc2409_prime_1024" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1014-1019">Source</a><h4 class="code-header">pub fn <a href="#method.get_rfc2409_prime_1024" class="fn">get_rfc2409_prime_1024</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a constant used in IKE as defined in <a href="https://tools.ietf.org/html/rfc2409#page-21"><code>RFC 2409</code></a>. This prime number is in
the order of magnitude of <code>2 ^ 1024</code>. This number is used during calculated key
exchanges such as Diffie-Hellman. This number is labeled Oakly group 2.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_rfc2409_prime_1024.html"><code>BN_get_rfc2409_prime_1024</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_rfc3526_prime_1536" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1028-1033">Source</a><h4 class="code-header">pub fn <a href="#method.get_rfc3526_prime_1536" class="fn">get_rfc3526_prime_1536</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a constant used in IKE as defined in <a href="https://tools.ietf.org/html/rfc3526#page-3"><code>RFC 3526</code></a>. The prime is in the order
of magnitude of <code>2 ^ 1536</code>. This number is used during calculated key
exchanges such as Diffie-Hellman. This number is labeled MODP group 5.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_rfc3526_prime_1536.html"><code>BN_get_rfc3526_prime_1536</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_rfc3526_prime_2048" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1042-1047">Source</a><h4 class="code-header">pub fn <a href="#method.get_rfc3526_prime_2048" class="fn">get_rfc3526_prime_2048</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a constant used in IKE as defined in <a href="https://tools.ietf.org/html/rfc3526#page-3"><code>RFC 3526</code></a>. The prime is in the order
of magnitude of <code>2 ^ 2048</code>. This number is used during calculated key
exchanges such as Diffie-Hellman. This number is labeled MODP group 14.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_rfc3526_prime_2048.html"><code>BN_get_rfc3526_prime_2048</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_rfc3526_prime_3072" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1056-1061">Source</a><h4 class="code-header">pub fn <a href="#method.get_rfc3526_prime_3072" class="fn">get_rfc3526_prime_3072</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a constant used in IKE as defined in <a href="https://tools.ietf.org/html/rfc3526#page-4"><code>RFC 3526</code></a>. The prime is in the order
of magnitude of <code>2 ^ 3072</code>. This number is used during calculated key
exchanges such as Diffie-Hellman. This number is labeled MODP group 15.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_rfc3526_prime_3072.html"><code>BN_get_rfc3526_prime_3072</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_rfc3526_prime_4096" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1070-1075">Source</a><h4 class="code-header">pub fn <a href="#method.get_rfc3526_prime_4096" class="fn">get_rfc3526_prime_4096</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a constant used in IKE as defined in <a href="https://tools.ietf.org/html/rfc3526#page-4"><code>RFC 3526</code></a>. The prime is in the order
of magnitude of <code>2 ^ 4096</code>. This number is used during calculated key
exchanges such as Diffie-Hellman. This number is labeled MODP group 16.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_rfc3526_prime_4096.html"><code>BN_get_rfc3526_prime_4096</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_rfc3526_prime_6144" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1084-1089">Source</a><h4 class="code-header">pub fn <a href="#method.get_rfc3526_prime_6144" class="fn">get_rfc3526_prime_6144</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a constant used in IKE as defined in <a href="https://tools.ietf.org/html/rfc3526#page-6"><code>RFC 3526</code></a>. The prime is in the order
of magnitude of <code>2 ^ 6144</code>. This number is used during calculated key
exchanges such as Diffie-Hellman. This number is labeled MODP group 17.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_rfc3526_prime_6114.html"><code>BN_get_rfc3526_prime_6114</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_rfc3526_prime_8192" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1098-1103">Source</a><h4 class="code-header">pub fn <a href="#method.get_rfc3526_prime_8192" class="fn">get_rfc3526_prime_8192</a>() -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a constant used in IKE as defined in <a href="https://tools.ietf.org/html/rfc3526#page-6"><code>RFC 3526</code></a>. The prime is in the order
of magnitude of <code>2 ^ 8192</code>. This number is used during calculated key
exchanges such as Diffie-Hellman. This number is labeled MODP group 18.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_rfc3526_prime_8192.html"><code>BN_get_rfc3526_prime_8192</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_slice" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1114-1126">Source</a><h4 class="code-header">pub fn <a href="#method.from_slice" class="fn">from_slice</a>(n: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new <code>BigNum</code> from an unsigned, big-endian encoded number of arbitrary length.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>bignum = BigNum::from_slice(<span class="kw-2">&amp;</span>[<span class="number">0x12</span>, <span class="number">0x00</span>, <span class="number">0x34</span>]).unwrap();
<span class="macro">assert_eq!</span>(bignum, BigNum::from_u32(<span class="number">0x120034</span>).unwrap());</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bin2bn.html"><code>BN_bin2bn</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_from_slice" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#1143-1150">Source</a><h4 class="code-header">pub fn <a href="#method.copy_from_slice" class="fn">copy_from_slice</a>(&amp;mut self, n: &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Copies data from a slice overwriting what was in the BigNum.</p>
<p>This function can be used to copy data from a slice to a
<a href="struct.BigNum.html#method.new_secure" title="associated function openssl::bn::BigNum::new_secure">secure BigNum</a>.</p>
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>bignum = BigNum::new().unwrap();
bignum.copy_from_slice(<span class="kw-2">&amp;</span>[<span class="number">0x12</span>, <span class="number">0x00</span>, <span class="number">0x34</span>]).unwrap();
<span class="macro">assert_eq!</span>(bignum, BigNum::from_u32(<span class="number">0x120034</span>).unwrap());</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bin2bn.html"><code>BN_bin2bn</code></a>.</p>
</div></details></div></details></div><details class="toggle big-toggle" open><summary><h2 id="deref-methods-BigNumRef" class="section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt;</span><a href="#deref-methods-BigNumRef" class="anchor">§</a></h2></summary><div id="deref-methods-BigNumRef-1" class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clear" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#172-174">Source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Erases the memory used by this <code>BigNum</code>, resetting its value to 0.</p>
<p>This can be used to destroy sensitive data such as keys when they are no longer needed.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_clear.html"><code>BN_clear</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_word" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#178-180">Source</a><h4 class="code-header">pub fn <a href="#method.add_word" class="fn">add_word</a>(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Adds a <code>u32</code> to <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_add_word.html"><code>BN_add_word</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.sub_word" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#184-186">Source</a><h4 class="code-header">pub fn <a href="#method.sub_word" class="fn">sub_word</a>(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Subtracts a <code>u32</code> from <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_sub_word.html"><code>BN_sub_word</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mul_word" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#190-192">Source</a><h4 class="code-header">pub fn <a href="#method.mul_word" class="fn">mul_word</a>(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Multiplies a <code>u32</code> by <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mul_word.html"><code>BN_mul_word</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.div_word" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#197-206">Source</a><h4 class="code-header">pub fn <a href="#method.div_word" class="fn">div_word</a>(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Divides <code>self</code> by a <code>u32</code>, returning the remainder.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_div_word.html"><code>BN_div_word</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mod_word" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#211-220">Source</a><h4 class="code-header">pub fn <a href="#method.mod_word" class="fn">mod_word</a>(&amp;self, w: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u64.html">u64</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the result of <code>self</code> modulo <code>w</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_word.html"><code>BN_mod_word</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rand_range" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#225-227">Source</a><h4 class="code-header">pub fn <a href="#method.rand_range" class="fn">rand_range</a>(&amp;self, rnd: &amp;mut <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places a cryptographically-secure pseudo-random nonnegative
number less than <code>self</code> in <code>rnd</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_rand_range.html"><code>BN_rand_range</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pseudo_rand_range" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#232-234">Source</a><h4 class="code-header">pub fn <a href="#method.pseudo_rand_range" class="fn">pseudo_rand_range</a>(&amp;self, rnd: &amp;mut <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>The cryptographically weak counterpart to <code>rand_in_range</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_pseudo_rand_range.html"><code>BN_pseudo_rand_range</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_bit" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#241-243">Source</a><h4 class="code-header">pub fn <a href="#method.set_bit" class="fn">set_bit</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets bit <code>n</code>. Equivalent to <code>self |= (1 &lt;&lt; n)</code>.</p>
<p>When setting a bit outside of <code>self</code>, it is expanded.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_set_bit.html"><code>BN_set_bit</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear_bit" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#250-252">Source</a><h4 class="code-header">pub fn <a href="#method.clear_bit" class="fn">clear_bit</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Clears bit <code>n</code>, setting it to 0. Equivalent to <code>self &amp;= ~(1 &lt;&lt; n)</code>.</p>
<p>When clearing a bit outside of <code>self</code>, an error is returned.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_clear_bit.html"><code>BN_clear_bit</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_bit_set" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#257-259">Source</a><h4 class="code-header">pub fn <a href="#method.is_bit_set" class="fn">is_bit_set</a>(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the <code>n</code>th bit of <code>self</code> is set to 1, <code>false</code> otherwise.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_bit_set.html"><code>BN_is_bit_set</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mask_bits" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#266-268">Source</a><h4 class="code-header">pub fn <a href="#method.mask_bits" class="fn">mask_bits</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Truncates <code>self</code> to the lowest <code>n</code> bits.</p>
<p>An error occurs if <code>self</code> is already shorter than <code>n</code> bits.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mask_bits.html"><code>BN_mask_bits</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lshift1" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#272-274">Source</a><h4 class="code-header">pub fn <a href="#method.lshift1" class="fn">lshift1</a>(&amp;mut self, a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a &lt;&lt; 1</code> in <code>self</code>. Equivalent to <code>self * 2</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_lshift1.html"><code>BN_lshift1</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rshift1" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#278-280">Source</a><h4 class="code-header">pub fn <a href="#method.rshift1" class="fn">rshift1</a>(&amp;mut self, a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a &gt;&gt; 1</code> in <code>self</code>. Equivalent to <code>self / 2</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_rshift1.html"><code>BN_rshift1</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.checked_add" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#286-288">Source</a><h4 class="code-header">pub fn <a href="#method.checked_add" class="fn">checked_add</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a + b</code> in <code>self</code>. <a href="struct.BigNumRef.html#method.add"><code>core::ops::Add</code></a> is also implemented for <code>BigNumRef</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_add.html"><code>BN_add</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.checked_sub" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#294-296">Source</a><h4 class="code-header">pub fn <a href="#method.checked_sub" class="fn">checked_sub</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a - b</code> in <code>self</code>. <a href="struct.BigNumRef.html#method.sub"><code>core::ops::Sub</code></a> is also implemented for <code>BigNumRef</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_sub.html"><code>BN_sub</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lshift" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#301-303">Source</a><h4 class="code-header">pub fn <a href="#method.lshift" class="fn">lshift</a>(&amp;mut self, a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a &lt;&lt; n</code> in <code>self</code>. Equivalent to <code>a * 2 ^ n</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_lshift.html"><code>BN_lshift</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rshift" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#308-310">Source</a><h4 class="code-header">pub fn <a href="#method.rshift" class="fn">rshift</a>(&amp;mut self, a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a &gt;&gt; n</code> in <code>self</code>. Equivalent to <code>a / 2 ^ n</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_rshift.html"><code>BN_rshift</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#314-316">Source</a><h4 class="code-header">pub fn <a href="#method.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new BigNum with the same value.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_dup.html"><code>BN_dup</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_negative" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#321-323">Source</a><h4 class="code-header">pub fn <a href="#method.set_negative" class="fn">set_negative</a>(&amp;mut self, negative: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Sets the sign of <code>self</code>. Pass true to set <code>self</code> to a negative. False sets
<code>self</code> positive.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_set_negative.html"><code>BN_set_negative</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ucmp" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#338-340">Source</a><h4 class="code-header">pub fn <a href="#method.ucmp" class="fn">ucmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class="docblock"><p>Compare the absolute values of <code>self</code> and <code>oth</code>.</p>
<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = -BigNum::from_u32(<span class="number">8</span>).unwrap();
<span class="kw">let </span>o = BigNum::from_u32(<span class="number">8</span>).unwrap();
<span class="macro">assert_eq!</span>(s.ucmp(<span class="kw-2">&amp;</span>o), Ordering::Equal);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_ucmp.html"><code>BN_ucmp</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_negative" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#344-346">Source</a><h4 class="code-header">pub fn <a href="#method.is_negative" class="fn">is_negative</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>self</code> is negative.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_negative.html"><code>BN_is_negative</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_even" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#351-353">Source</a><h4 class="code-header">pub fn <a href="#method.is_even" class="fn">is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> is <code>self</code> is even.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_even.html"><code>BN_is_even</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_odd" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#358-360">Source</a><h4 class="code-header">pub fn <a href="#method.is_odd" class="fn">is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> is <code>self</code> is odd.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_odd.html"><code>BN_is_odd</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.num_bits" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#365-367">Source</a><h4 class="code-header">pub fn <a href="#method.num_bits" class="fn">num_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a></h4></section></summary><div class="docblock"><p>Returns the number of significant bits in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_num_bits.html"><code>BN_num_bits</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.num_bytes" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#370-372">Source</a><h4 class="code-header">pub fn <a href="#method.num_bytes" class="fn">num_bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a></h4></section></summary><div class="docblock"><p>Returns the size of <code>self</code> in bytes. Implemented natively.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rand" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#400-410">Source</a><h4 class="code-header">pub fn <a href="#method.rand" class="fn">rand</a>(
&amp;mut self,
bits: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>,
msb: <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a>,
odd: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Generates a cryptographically strong pseudo-random <code>BigNum</code>, placing it in <code>self</code>.</p>
<h5 id="parameters"><a class="doc-anchor" href="#parameters">§</a>Parameters</h5>
<ul>
<li><code>bits</code>: Length of the number in bits.</li>
<li><code>msb</code>: The desired properties of the most significant bit. See <a href="index.html#constants"><code>constants</code></a>.</li>
<li><code>odd</code>: If <code>true</code>, the generated number will be odd.</li>
</ul>
<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::bn::{BigNum, MsbOption};
<span class="kw">use </span>openssl::error::ErrorStack;
<span class="kw">fn </span>generate_random() -&gt; <span class="prelude-ty">Result</span>&lt; BigNum, ErrorStack &gt; {
<span class="kw">let </span><span class="kw-2">mut </span>big = BigNum::new()<span class="question-mark">?</span>;
<span class="comment">// Generates a 128-bit odd random number
</span>big.rand(<span class="number">128</span>, MsbOption::MAYBE_ZERO, <span class="bool-val">true</span>);
<span class="prelude-val">Ok</span>((big))
}</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_rand.html"><code>BN_rand</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pseudo_rand" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#416-426">Source</a><h4 class="code-header">pub fn <a href="#method.pseudo_rand" class="fn">pseudo_rand</a>(
&amp;mut self,
bits: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>,
msb: <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a>,
odd: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>The cryptographically weak counterpart to <code>rand</code>. Not suitable for key generation.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_pseudo_rand.html"><code>BN_pseudo_rand</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.generate_prime" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#452-470">Source</a><h4 class="code-header">pub fn <a href="#method.generate_prime" class="fn">generate_prime</a>(
&amp;mut self,
bits: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>,
safe: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,
add: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt;,
rem: <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Generates a prime number, placing it in <code>self</code>.</p>
<h5 id="parameters-1"><a class="doc-anchor" href="#parameters-1">§</a>Parameters</h5>
<ul>
<li><code>bits</code>: The length of the prime in bits (lower bound).</li>
<li><code>safe</code>: If true, returns a “safe” prime <code>p</code> so that <code>(p-1)/2</code> is also prime.</li>
<li><code>add</code>/<code>rem</code>: If <code>add</code> is set to <code>Some(add)</code>, <code>p % add == rem</code> will hold, where <code>p</code> is the
generated prime and <code>rem</code> is <code>1</code> if not specified (<code>None</code>).</li>
</ul>
<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::bn::BigNum;
<span class="kw">use </span>openssl::error::ErrorStack;
<span class="kw">fn </span>generate_weak_prime() -&gt; <span class="prelude-ty">Result</span>&lt; BigNum, ErrorStack &gt; {
<span class="kw">let </span><span class="kw-2">mut </span>big = BigNum::new()<span class="question-mark">?</span>;
<span class="comment">// Generates a 128-bit simple prime number
</span>big.generate_prime(<span class="number">128</span>, <span class="bool-val">false</span>, <span class="prelude-val">None</span>, <span class="prelude-val">None</span>);
<span class="prelude-val">Ok</span>((big))
}</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_generate_prime_ex.html"><code>BN_generate_prime_ex</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.checked_mul" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#477-492">Source</a><h4 class="code-header">pub fn <a href="#method.checked_mul" class="fn">checked_mul</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a * b</code> in <code>self</code>.
<a href="struct.BigNumRef.html#method.mul"><code>core::ops::Mul</code></a> is also implemented for <code>BigNumRef</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mul.html"><code>BN_mul</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.checked_div" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#499-515">Source</a><h4 class="code-header">pub fn <a href="#method.checked_div" class="fn">checked_div</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a / b</code> in <code>self</code>. The remainder is discarded.
<a href="struct.BigNumRef.html#method.div"><code>core::ops::Div</code></a> is also implemented for <code>BigNumRef</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_div.html"><code>BN_div</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.checked_rem" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#519-535">Source</a><h4 class="code-header">pub fn <a href="#method.checked_rem" class="fn">checked_rem</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a % b</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_div.html"><code>BN_div</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.div_rem" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#539-556">Source</a><h4 class="code-header">pub fn <a href="#method.div_rem" class="fn">div_rem</a>(
&amp;mut self,
rem: &amp;mut <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a / b</code> in <code>self</code> and <code>a % b</code> in <code>rem</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_div.html"><code>BN_div</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.sqr" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#560-562">Source</a><h4 class="code-header">pub fn <a href="#method.sqr" class="fn">sqr</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code></code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_sqr.html"><code>BN_sqr</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.nnmod" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#567-582">Source</a><h4 class="code-header">pub fn <a href="#method.nnmod" class="fn">nnmod</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a mod m</code> in <code>self</code>. As opposed to <code>div_rem</code>
the result is non-negative.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_nnmod.html"><code>BN_nnmod</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mod_add" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#586-603">Source</a><h4 class="code-header">pub fn <a href="#method.mod_add" class="fn">mod_add</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>(a + b) mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_add.html"><code>BN_mod_add</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mod_sub" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#607-624">Source</a><h4 class="code-header">pub fn <a href="#method.mod_sub" class="fn">mod_sub</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>(a - b) mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_sub.html"><code>BN_mod_sub</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mod_mul" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#628-645">Source</a><h4 class="code-header">pub fn <a href="#method.mod_mul" class="fn">mod_mul</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>(a * b) mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_mul.html"><code>BN_mod_mul</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mod_sqr" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#649-664">Source</a><h4 class="code-header">pub fn <a href="#method.mod_sqr" class="fn">mod_sqr</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a² mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_sqr.html"><code>BN_mod_sqr</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mod_sqrt" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#668-683">Source</a><h4 class="code-header">pub fn <a href="#method.mod_sqrt" class="fn">mod_sqrt</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
p: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places into <code>self</code> the modular square root of <code>a</code> such that <code>self^2 = a (mod p)</code></p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_sqrt.html"><code>BN_mod_sqrt</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.exp" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#687-702">Source</a><h4 class="code-header">pub fn <a href="#method.exp" class="fn">exp</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
p: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a^p</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_exp.html"><code>BN_exp</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mod_exp" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#706-723">Source</a><h4 class="code-header">pub fn <a href="#method.mod_exp" class="fn">mod_exp</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
p: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a^p mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_exp.html"><code>BN_mod_exp</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mod_inverse" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#727-742">Source</a><h4 class="code-header">pub fn <a href="#method.mod_inverse" class="fn">mod_inverse</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
n: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the inverse of <code>a</code> modulo <code>n</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_inverse.html"><code>BN_mod_inverse</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.gcd" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#746-761">Source</a><h4 class="code-header">pub fn <a href="#method.gcd" class="fn">gcd</a>(
&amp;mut self,
a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the greatest common denominator of <code>a</code> and <code>b</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_gcd.html"><code>BN_gcd</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_prime" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#773-783">Source</a><h4 class="code-header">pub fn <a href="#method.is_prime" class="fn">is_prime</a>(
&amp;self,
checks: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Checks whether <code>self</code> is prime.</p>
<p>Performs a Miller-Rabin probabilistic primality test with <code>checks</code> iterations.</p>
<h5 id="return-value"><a class="doc-anchor" href="#return-value">§</a>Return Value</h5>
<p>Returns <code>true</code> if <code>self</code> is prime with an error probability of less than <code>0.25 ^ checks</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_prime_ex.html"><code>BN_is_prime_ex</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_prime_fasttest" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#797-813">Source</a><h4 class="code-header">pub fn <a href="#method.is_prime_fasttest" class="fn">is_prime_fasttest</a>(
&amp;self,
checks: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>,
ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,
do_trial_division: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Checks whether <code>self</code> is prime with optional trial division.</p>
<p>If <code>do_trial_division</code> is <code>true</code>, first performs trial division by a number of small primes.
Then, like <code>is_prime</code>, performs a Miller-Rabin probabilistic primality test with <code>checks</code>
iterations.</p>
<h5 id="return-value-1"><a class="doc-anchor" href="#return-value-1">§</a>Return Value</h5>
<p>Returns <code>true</code> if <code>self</code> is prime with an error probability of less than <code>0.25 ^ checks</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_prime_fasttest_ex.html"><code>BN_is_prime_fasttest_ex</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_vec" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#828-836">Source</a><h4 class="code-header">pub fn <a href="#method.to_vec" class="fn">to_vec</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>&gt; <a href="#" class="tooltip" data-notable-ty="Vec&lt;u8&gt;"></a></h4></section></summary><div class="docblock"><p>Returns a big-endian byte vector representation of the absolute value of <code>self</code>.</p>
<p><code>self</code> can be recreated by using <code>from_slice</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = -BigNum::from_u32(<span class="number">4543</span>).unwrap();
<span class="kw">let </span>r = BigNum::from_u32(<span class="number">4543</span>).unwrap();
<span class="kw">let </span>s_vec = s.to_vec();
<span class="macro">assert_eq!</span>(BigNum::from_slice(<span class="kw-2">&amp;</span>s_vec).unwrap(), r);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bn2bin.html"><code>BN_bn2bin</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_vec_padded" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#861-868">Source</a><h4 class="code-header">pub fn <a href="#method.to_vec_padded" class="fn">to_vec_padded</a>(&amp;self, pad_to: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>&gt;, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a big-endian byte vector representation of the absolute value of <code>self</code> padded
to <code>pad_to</code> bytes.</p>
<p>If <code>pad_to</code> is less than <code>self.num_bytes()</code> then an error is returned.</p>
<p><code>self</code> can be recreated by using <code>from_slice</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>bn = BigNum::from_u32(<span class="number">0x4543</span>).unwrap();
<span class="kw">let </span>bn_vec = bn.to_vec_padded(<span class="number">4</span>).unwrap();
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>bn_vec, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0x45</span>, <span class="number">0x43</span>]);
<span class="kw">let </span>r = bn.to_vec_padded(<span class="number">1</span>);
<span class="macro">assert!</span>(r.is_err());
<span class="kw">let </span>bn = -BigNum::from_u32(<span class="number">0x4543</span>).unwrap();
<span class="kw">let </span>bn_vec = bn.to_vec_padded(<span class="number">4</span>).unwrap();
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>bn_vec, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0x45</span>, <span class="number">0x43</span>]);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bn2binpad.html"><code>BN_bn2binpad</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_dec_str" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#879-884">Source</a><h4 class="code-header">pub fn <a href="#method.to_dec_str" class="fn">to_dec_str</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../string/struct.OpensslString.html" title="struct openssl::string::OpensslString">OpensslString</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a decimal string representation of <code>self</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = -BigNum::from_u32(<span class="number">12345</span>).unwrap();
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;**</span>s.to_dec_str().unwrap(), <span class="string">"-12345"</span>);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bn2dec.html"><code>BN_bn2dec</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_hex_str" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#895-900">Source</a><h4 class="code-header">pub fn <a href="#method.to_hex_str" class="fn">to_hex_str</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../string/struct.OpensslString.html" title="struct openssl::string::OpensslString">OpensslString</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a hexadecimal string representation of <code>self</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = -BigNum::from_u32(<span class="number">0x99ff</span>).unwrap();
<span class="macro">assert_eq!</span>(s.to_hex_str().unwrap().to_uppercase(), <span class="string">"-99FF"</span>);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bn2hex.html"><code>BN_bn2hex</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_asn1_integer" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#904-909">Source</a><h4 class="code-header">pub fn <a href="#method.to_asn1_integer" class="fn">to_asn1_integer</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../asn1/struct.Asn1Integer.html" title="struct openssl::asn1::Asn1Integer">Asn1Integer</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns an <code>Asn1Integer</code> containing the value of <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_to_ASN1_INTEGER.html"><code>BN_to_ASN1_INTEGER</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_const_time" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#914-916">Source</a><h4 class="code-header">pub fn <a href="#method.set_const_time" class="fn">set_const_time</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Force constant time computation on this value.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_set_flags.html"><code>BN_set_flags</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_const_time" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#921-926">Source</a><h4 class="code-header">pub fn <a href="#method.is_const_time" class="fn">is_const_time</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if <code>self</code> is in const time mode.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_flags.html"><code>BN_get_flags</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_secure" class="method"><a class="src rightside" href="../../src/openssl/bn.rs.html#931-936">Source</a><h4 class="code-header">pub fn <a href="#method.is_secure" class="fn">is_secure</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if <code>self</code> was created with <a href="struct.BigNum.html#method.new_secure" title="associated function openssl::bn::BigNum::new_secure"><code>BigNum::new_secure</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_flags.html"><code>BN_get_flags</code></a>.</p>
</div></details></div></details><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Add%3C%26BigNum%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#impl-Add%3C%26BigNum%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.add-2" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#method.add-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#tymethod.add" class="fn">add</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Add%3C%26BigNum%3E-for-%26BigNumRef" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#impl-Add%3C%26BigNum%3E-for-%26BigNumRef" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.add" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#method.add" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#tymethod.add" class="fn">add</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Add%3C%26BigNumRef%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#impl-Add%3C%26BigNumRef%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.add-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1291">Source</a><a href="#method.add-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#tymethod.add" class="fn">add</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CBigNumRef%3E-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#impl-AsRef%3CBigNumRef%3E-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CBigNumRef%3E-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#impl-Borrow%3CBigNumRef%3E-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1162-1169">Source</a><a href="#impl-Debug-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1163-1168">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.93.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#impl-Deref-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#impl-DerefMut-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1180-1187">Source</a><a href="#impl-Display-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1181-1186">Source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.93.1/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Div%3C%26BigNum%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#impl-Div%3C%26BigNum%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html" title="trait core::ops::arith::Div">Div</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-11" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#associatedtype.Output-11" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>/</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.div-2" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#method.div-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#tymethod.div" class="fn">div</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>/</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#tymethod.div">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Div%3C%26BigNum%3E-for-%26BigNumRef" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#impl-Div%3C%26BigNum%3E-for-%26BigNumRef" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html" title="trait core::ops::arith::Div">Div</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-9" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#associatedtype.Output-9" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>/</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.div" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#method.div" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#tymethod.div" class="fn">div</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>/</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#tymethod.div">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Div%3C%26BigNumRef%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#impl-Div%3C%26BigNumRef%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html" title="trait core::ops::arith::Div">Div</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-10" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#associatedtype.Output-10" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>/</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.div-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1329">Source</a><a href="#method.div-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#tymethod.div" class="fn">div</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>/</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Div.html#tymethod.div">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#impl-Drop-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Executes the destructor for this type. <a href="https://doc.rust-lang.org/1.93.1/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ForeignType-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#impl-ForeignType-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../../foreign_types_shared/trait.ForeignType.html" title="trait foreign_types_shared::ForeignType">ForeignType</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.CType" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#associatedtype.CType" class="anchor">§</a><h4 class="code-header">type <a href="../../foreign_types_shared/trait.ForeignType.html#associatedtype.CType" class="associatedtype">CType</a> = <a class="enum" href="../../openssl_sys/openssl/handwritten/types/enum.BIGNUM.html" title="enum openssl_sys::openssl::handwritten::types::BIGNUM">BIGNUM</a></h4></section></summary><div class='docblock'>The raw C type.</div></details><details class="toggle" open><summary><section id="associatedtype.Ref" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#associatedtype.Ref" class="anchor">§</a><h4 class="code-header">type <a href="../../foreign_types_shared/trait.ForeignType.html#associatedtype.Ref" class="associatedtype">Ref</a> = <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h4></section></summary><div class='docblock'>The type representing a reference to this type.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_ptr" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#method.from_ptr" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="../../foreign_types_shared/trait.ForeignType.html#tymethod.from_ptr" class="fn">from_ptr</a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.pointer.html">*mut </a><a class="enum" href="../../openssl_sys/openssl/handwritten/types/enum.BIGNUM.html" title="enum openssl_sys::openssl::handwritten::types::BIGNUM">BIGNUM</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Constructs an instance of this type from its raw type.</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ptr" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#method.as_ptr" class="anchor">§</a><h4 class="code-header">fn <a href="../../foreign_types_shared/trait.ForeignType.html#tymethod.as_ptr" class="fn">as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.pointer.html">*mut </a><a class="enum" href="../../openssl_sys/openssl/handwritten/types/enum.BIGNUM.html" title="enum openssl_sys::openssl::handwritten::types::BIGNUM">BIGNUM</a></h4></section></summary><div class='docblock'>Returns a raw pointer to the wrapped value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Mul%3C%26BigNum%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#impl-Mul%3C%26BigNum%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-8" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#associatedtype.Output-8" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.mul-2" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#method.mul-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#tymethod.mul" class="fn">mul</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Mul%3C%26BigNum%3E-for-%26BigNumRef" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#impl-Mul%3C%26BigNum%3E-for-%26BigNumRef" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-6" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#associatedtype.Output-6" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.mul" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#method.mul" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#tymethod.mul" class="fn">mul</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Mul%3C%26BigNumRef%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#impl-Mul%3C%26BigNumRef%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-7" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#associatedtype.Output-7" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.mul-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1316">Source</a><a href="#method.mul-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#tymethod.mul" class="fn">mul</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Neg-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1388-1394">Source</a><a href="#impl-Neg-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Neg.html" title="trait core::ops::arith::Neg">Neg</a> for &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-17" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1389">Source</a><a href="#associatedtype.Output-17" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Neg.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.neg" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1391-1393">Source</a><a href="#method.neg" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Neg.html#tymethod.neg" class="fn">neg</a>(self) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Neg.html#tymethod.neg">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Neg-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1396-1404">Source</a><a href="#impl-Neg-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Neg.html" title="trait core::ops::arith::Neg">Neg</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-18" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1397">Source</a><a href="#associatedtype.Output-18" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Neg.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.neg-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1399-1403">Source</a><a href="#method.neg-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Neg.html#tymethod.neg" class="fn">neg</a>(self) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Neg.html#tymethod.neg">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1247-1251">Source</a><a href="#impl-Ord-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1248-1250">Source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1021-1023">Source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1060-1062">Source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1086-1088">Source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -&gt; Self<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBigNum%3E-for-BigNumRef" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1195-1199">Source</a><a href="#impl-PartialEq%3CBigNum%3E-for-BigNumRef" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1196-1198">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBigNumRef%3E-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1209-1213">Source</a><a href="#impl-PartialEq%3CBigNumRef%3E-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1210-1212">Source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1203-1207">Source</a><a href="#impl-PartialEq-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1204-1206">Source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBigNum%3E-for-BigNumRef" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1223-1227">Source</a><a href="#impl-PartialOrd%3CBigNum%3E-for-BigNumRef" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1224-1226">Source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1398">Source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1416">Source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the
<code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1434">Source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code>
operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1452">Source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by
the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBigNumRef%3E-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1241-1245">Source</a><a href="#impl-PartialOrd%3CBigNumRef%3E-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1242-1244">Source</a><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1398">Source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1416">Source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the
<code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1434">Source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code>
operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1452">Source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by
the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1235-1239">Source</a><a href="#impl-PartialOrd-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1236-1238">Source</a><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/1.93.1/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1398">Source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1416">Source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the
<code>&lt;=</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1434">Source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code>
operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/cmp.rs.html#1452">Source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;Rhs</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by
the <code>&gt;=</code> operator. <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Rem%3C%26BigNum%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#impl-Rem%3C%26BigNum%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html" title="trait core::ops::arith::Rem">Rem</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-14" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#associatedtype.Output-14" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>%</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.rem-2" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#method.rem-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#tymethod.rem" class="fn">rem</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>%</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#tymethod.rem">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Rem%3C%26BigNum%3E-for-%26BigNumRef" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#impl-Rem%3C%26BigNum%3E-for-%26BigNumRef" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html" title="trait core::ops::arith::Rem">Rem</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-12" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#associatedtype.Output-12" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>%</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.rem" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#method.rem" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#tymethod.rem" class="fn">rem</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>%</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#tymethod.rem">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Rem%3C%26BigNumRef%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#impl-Rem%3C%26BigNumRef%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html" title="trait core::ops::arith::Rem">Rem</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-13" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#associatedtype.Output-13" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>%</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.rem-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1342">Source</a><a href="#method.rem-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#tymethod.rem" class="fn">rem</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>%</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Rem.html#tymethod.rem">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Shl%3Ci32%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1354-1360">Source</a><a href="#impl-Shl%3Ci32%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/bit/trait.Shl.html" title="trait core::ops::bit::Shl">Shl</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>&gt; for &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-15" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1355">Source</a><a href="#associatedtype.Output-15" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/bit/trait.Shl.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>&lt;&lt;</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.shl" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1357-1359">Source</a><a href="#method.shl" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/bit/trait.Shl.html#tymethod.shl" class="fn">shl</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>&lt;&lt;</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/bit/trait.Shl.html#tymethod.shl">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Shr%3Ci32%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1372-1378">Source</a><a href="#impl-Shr%3Ci32%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/bit/trait.Shr.html" title="trait core::ops::bit::Shr">Shr</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>&gt; for &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-16" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1373">Source</a><a href="#associatedtype.Output-16" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/bit/trait.Shr.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>&gt;&gt;</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.shr" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1375-1377">Source</a><a href="#method.shr" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/bit/trait.Shr.html#tymethod.shr" class="fn">shr</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.i32.html">i32</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>&gt;&gt;</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/bit/trait.Shr.html#tymethod.shr">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sub%3C%26BigNum%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#impl-Sub%3C%26BigNum%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-5" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#associatedtype.Output-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.sub-2" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#method.sub-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#tymethod.sub" class="fn">sub</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sub%3C%26BigNum%3E-for-%26BigNumRef" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#impl-Sub%3C%26BigNum%3E-for-%26BigNumRef" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.sub" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#method.sub" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#tymethod.sub" class="fn">sub</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sub%3C%26BigNumRef%3E-for-%26BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#impl-Sub%3C%26BigNumRef%3E-for-%26BigNum" class="anchor">§</a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.sub-1" class="method trait-impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1303">Source</a><a href="#method.sub-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#tymethod.sub" class="fn">sub</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/1.93.1/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></div></details></div></details><section id="impl-Eq-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#1215">Source</a><a href="#impl-Eq-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section><section id="impl-Send-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#impl-Send-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section><section id="impl-Sync-for-BigNum" class="impl"><a class="src rightside" href="../../src/openssl/bn.rs.html#133-165">Source</a><a href="#impl-Sync-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-BigNum" class="impl"><a href="#impl-Freeze-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section><section id="impl-RefUnwindSafe-for-BigNum" class="impl"><a href="#impl-RefUnwindSafe-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section><section id="impl-Unpin-for-BigNum" class="impl"><a href="#impl-Unpin-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section><section id="impl-UnwindSafe-for-BigNum" class="impl"><a href="#impl-UnwindSafe-for-BigNum" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Receiver-for-P" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/ops/deref.rs.html#378-380">Source</a><a href="#impl-Receiver-for-P" class="anchor">§</a><h3 class="code-header">impl&lt;P, T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Receiver.html" title="trait core::ops::deref::Receiver">Receiver</a> for P<div class="where">where
P: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = T&gt; + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/ops/deref.rs.html#382">Source</a><a href="#associatedtype.Target-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/ops/deref/trait.Receiver.html#associatedtype.Target" class="associatedtype">Target</a> = T</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>arbitrary_self_types</code>)</span></div></span><div class='docblock'>The target type on which the method may be called.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/alloc/string.rs.html#2864">Source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/alloc/string.rs.html#2866">Source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.93.1/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.u8.html\">u8</a>, A&gt;</code></h3><pre><code><div class=\"where\">impl&lt;A&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a>&lt;<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.u8.html\">u8</a>, A&gt;<div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>"}</script></section></div></main></body></html>