halo2/rustdoc/latest/halo2_proofs/arithmetic/trait.Field.html

63 lines
26 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="This trait represents an element of a field."><meta name="keywords" content="rust, rustlang, rust-lang, Field"><title>Field in halo2_proofs::arithmetic - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\(", right: "\\)", display: false},
{left: "$", right: "$", display: false},
{left: "\\[", right: "\\]", display: true}
]
});
});
</script>
</head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../halo2_proofs/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
</a><h2 class="location"></h2>
</nav>
<nav class="sidebar"><a class="sidebar-logo" href="../../halo2_proofs/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
</a><h2 class="location"><a href="#">Field</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.double">double</a></li><li><a href="#tymethod.invert">invert</a></li><li><a href="#tymethod.one">one</a></li><li><a href="#tymethod.random">random</a></li><li><a href="#tymethod.sqrt">sqrt</a></li><li><a href="#tymethod.square">square</a></li><li><a href="#tymethod.zero">zero</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><ul><li><a href="#method.cube">cube</a></li><li><a href="#method.is_zero">is_zero</a></li><li><a href="#method.is_zero_vartime">is_zero_vartime</a></li><li><a href="#method.pow_vartime">pow_vartime</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-Field-for-Fp">Fp</a></li><li><a href="#impl-Field-for-Fq">Fq</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In halo2_proofs::arithmetic</a></h2><div id="sidebar-vars" data-name="Field" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../halo2_proofs/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
<h1 class="fqn"><span class="in-band">Trait <a href="../index.html">halo2_proofs</a>::<wbr><a href="index.html">arithmetic</a>::<wbr><a class="trait" href="#">Field</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait Field: 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://docs.rs/subtle/2.4.1/subtle/trait.ConditionallySelectable.html" title="trait subtle::ConditionallySelectable">ConditionallySelectable</a> + <a class="trait" href="https://docs.rs/subtle/2.4.1/subtle/trait.ConstantTimeEq.html" title="trait subtle::ConstantTimeEq">ConstantTimeEq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;Self, Output = Self, Output = Self&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;Self, Output = Self, Output = Self&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a>&lt;Self, Output = Self, Output = Self&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Neg.html" title="trait core::ops::arith::Neg">Neg</a>&lt;Output = Self&gt; + for&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>Self&gt; + for&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>Self&gt; + for&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>Self&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.MulAssign.html" title="trait core::ops::arith::MulAssign">MulAssign</a>&lt;Self&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.AddAssign.html" title="trait core::ops::arith::AddAssign">AddAssign</a>&lt;Self&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.SubAssign.html" title="trait core::ops::arith::SubAssign">SubAssign</a>&lt;Self&gt; + for&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.MulAssign.html" title="trait core::ops::arith::MulAssign">MulAssign</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>Self&gt; + for&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.AddAssign.html" title="trait core::ops::arith::AddAssign">AddAssign</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>Self&gt; + for&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.SubAssign.html" title="trait core::ops::arith::SubAssign">SubAssign</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>Self&gt; {
fn <a href="#tymethod.random" class="fnname">random</a>(rng: impl <a class="trait" href="https://rust-random.github.io/rand/rand_core/trait.RngCore.html" title="trait rand_core::RngCore">RngCore</a>) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.zero" class="fnname">zero</a>() -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.one" class="fnname">one</a>() -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.square" class="fnname">square</a>(&amp;self) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.double" class="fnname">double</a>(&amp;self) -&gt; Self;
<span class="item-spacer"></span> fn <a href="#tymethod.invert" class="fnname">invert</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.CtOption.html" title="struct subtle::CtOption">CtOption</a>&lt;Self&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.sqrt" class="fnname">sqrt</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.CtOption.html" title="struct subtle::CtOption">CtOption</a>&lt;Self&gt;;
fn <a href="#method.is_zero" class="fnname">is_zero</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.Choice.html" title="struct subtle::Choice">Choice</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.is_zero_vartime" class="fnname">is_zero_vartime</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.cube" class="fnname">cube</a>(&amp;self) -&gt; Self { ... }
<span class="item-spacer"></span> fn <a href="#method.pow_vartime" class="fnname">pow_vartime</a>&lt;S&gt;(&amp;self, exp: S) -&gt; Self<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;</span>,
{ ... }
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This trait represents an element of a field.</p>
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.random" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#tymethod.random" class="fnname">random</a>(rng: impl <a class="trait" href="https://rust-random.github.io/rand/rand_core/trait.RngCore.html" title="trait rand_core::RngCore">RngCore</a>) -&gt; Self</h4></div></summary><div class="docblock"><p>Returns an element chosen uniformly at random using a user-provided RNG.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.zero" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#tymethod.zero" class="fnname">zero</a>() -&gt; Self</h4></div></summary><div class="docblock"><p>Returns the zero element of the field, the additive identity.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.one" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#tymethod.one" class="fnname">one</a>() -&gt; Self</h4></div></summary><div class="docblock"><p>Returns the one element of the field, the multiplicative identity.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.square" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#tymethod.square" class="fnname">square</a>(&amp;self) -&gt; Self</h4></div></summary><div class="docblock"><p>Squares this element.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.double" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#tymethod.double" class="fnname">double</a>(&amp;self) -&gt; Self</h4></div></summary><div class="docblock"><p>Doubles this element.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.invert" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#tymethod.invert" class="fnname">invert</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.CtOption.html" title="struct subtle::CtOption">CtOption</a>&lt;Self&gt;</h4></div></summary><div class="docblock"><p>Computes the multiplicative inverse of this element,
failing if the element is zero.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="tymethod.sqrt" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#tymethod.sqrt" class="fnname">sqrt</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.CtOption.html" title="struct subtle::CtOption">CtOption</a>&lt;Self&gt;</h4></div></summary><div class="docblock"><p>Returns the square root of the field element, if it is
quadratic residue.</p>
</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.is_zero" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#method.is_zero" class="fnname">is_zero</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.Choice.html" title="struct subtle::Choice">Choice</a></h4></div></summary><div class="docblock"><p>Returns true iff this element is zero.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.is_zero_vartime" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#method.is_zero_vartime" class="fnname">is_zero_vartime</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>Returns true iff this element is zero.</p>
<h5 id="security"><a href="#security">Security</a></h5>
<p>This method provides <strong>no</strong> constant-time guarantees. Implementors of the
<code>Field</code> trait <strong>may</strong> optimise this method using non-constant-time logic.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.cube" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#method.cube" class="fnname">cube</a>(&amp;self) -&gt; Self</h4></div></summary><div class="docblock"><p>Cubes this element.</p>
</div></details><details class="rustdoc-toggle" open><summary><div id="method.pow_vartime" class="method has-srclink"><div class="rightside"></div><h4 class="code-header">fn <a href="#method.pow_vartime" class="fnname">pow_vartime</a>&lt;S&gt;(&amp;self, exp: S) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;,&nbsp;</span></h4></div></summary><div class="docblock"><p>Exponentiates <code>self</code> by <code>exp</code>, where <code>exp</code> is a little-endian order
integer exponent.</p>
<p><strong>This operation is variable time with respect to the exponent.</strong> If the
exponent is fixed, this operation is effectively constant time.</p>
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Field-for-Fp" class="impl has-srclink"><a href="#impl-Field-for-Fp" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Field.html" title="trait halo2_proofs::arithmetic::Field">Field</a> for Fp</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sqrt" class="method trait-impl has-srclink"><a href="#method.sqrt" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.sqrt" class="fnname">sqrt</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.CtOption.html" title="struct subtle::CtOption">CtOption</a>&lt;Fp&gt;</h4></section></summary><div class="docblock"><p>Computes the square root of this element, if it exists.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.invert" class="method trait-impl has-srclink"><a href="#method.invert" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.invert" class="fnname">invert</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.CtOption.html" title="struct subtle::CtOption">CtOption</a>&lt;Fp&gt;</h4></section></summary><div class="docblock"><p>Computes the multiplicative inverse of this element,
failing if the element is zero.</p>
</div></details><section id="method.random" class="method trait-impl has-srclink"><a href="#method.random" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.random" class="fnname">random</a>(rng: impl <a class="trait" href="https://rust-random.github.io/rand/rand_core/trait.RngCore.html" title="trait rand_core::RngCore">RngCore</a>) -&gt; Fp</h4></section><section id="method.zero" class="method trait-impl has-srclink"><a href="#method.zero" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.zero" class="fnname">zero</a>() -&gt; Fp</h4></section><section id="method.one" class="method trait-impl has-srclink"><a href="#method.one" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.one" class="fnname">one</a>() -&gt; Fp</h4></section><section id="method.double" class="method trait-impl has-srclink"><a href="#method.double" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.double" class="fnname">double</a>(&amp;self) -&gt; Fp</h4></section><section id="method.square" class="method trait-impl has-srclink"><a href="#method.square" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.square" class="fnname">square</a>(&amp;self) -&gt; Fp</h4></section><section id="method.pow_vartime-1" class="method trait-impl has-srclink"><a href="#method.pow_vartime-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.pow_vartime" class="fnname">pow_vartime</a>&lt;S&gt;(&amp;self, exp: S) -&gt; Fp <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;,&nbsp;</span></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Field-for-Fq" class="impl has-srclink"><a href="#impl-Field-for-Fq" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Field.html" title="trait halo2_proofs::arithmetic::Field">Field</a> for Fq</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sqrt-1" class="method trait-impl has-srclink"><a href="#method.sqrt-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.sqrt" class="fnname">sqrt</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.CtOption.html" title="struct subtle::CtOption">CtOption</a>&lt;Fq&gt;</h4></section></summary><div class="docblock"><p>Computes the square root of this element, if it exists.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.invert-1" class="method trait-impl has-srclink"><a href="#method.invert-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.invert" class="fnname">invert</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/subtle/2.4.1/subtle/struct.CtOption.html" title="struct subtle::CtOption">CtOption</a>&lt;Fq&gt;</h4></section></summary><div class="docblock"><p>Computes the multiplicative inverse of this element,
failing if the element is zero.</p>
</div></details><section id="method.random-1" class="method trait-impl has-srclink"><a href="#method.random-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.random" class="fnname">random</a>(rng: impl <a class="trait" href="https://rust-random.github.io/rand/rand_core/trait.RngCore.html" title="trait rand_core::RngCore">RngCore</a>) -&gt; Fq</h4></section><section id="method.zero-1" class="method trait-impl has-srclink"><a href="#method.zero-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.zero" class="fnname">zero</a>() -&gt; Fq</h4></section><section id="method.one-1" class="method trait-impl has-srclink"><a href="#method.one-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.one" class="fnname">one</a>() -&gt; Fq</h4></section><section id="method.double-1" class="method trait-impl has-srclink"><a href="#method.double-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.double" class="fnname">double</a>(&amp;self) -&gt; Fq</h4></section><section id="method.square-1" class="method trait-impl has-srclink"><a href="#method.square-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.square" class="fnname">square</a>(&amp;self) -&gt; Fq</h4></section><section id="method.pow_vartime-2" class="method trait-impl has-srclink"><a href="#method.pow_vartime-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.pow_vartime" class="fnname">pow_vartime</a>&lt;S&gt;(&amp;self, exp: S) -&gt; Fq <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;,&nbsp;</span></h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><script type="text/javascript" src="../../implementors/ff/trait.Field.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="halo2_proofs" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.62.0-nightly (30f386087 2022-05-05)" ></div>
</body></html>