This commit is contained in:
str4d 2023-03-07 17:39:29 +00:00
parent 7987c940e0
commit 2154633bc2
50 changed files with 406 additions and 406 deletions

View File

@ -14,11 +14,11 @@
});
</script>
</head><body class="rustdoc enum"><!--[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="logo-container" href="../../../halo2_gadgets/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../halo2_gadgets/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">ScalarVar</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block"><li><a href="#variant.BaseFieldElem">BaseFieldElem</a></li><li><a href="#variant.FullWidth">FullWidth</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-ScalarVar">Clone</a></li><li><a href="#impl-Debug-for-ScalarVar">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-ScalarVar">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ScalarVar">Send</a></li><li><a href="#impl-Sync-for-ScalarVar">Sync</a></li><li><a href="#impl-Unpin-for-ScalarVar">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ScalarVar">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-ScalarVar">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-ScalarVar">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-ScalarVar">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-Conv-for-ScalarVar">Conv</a></li><li><a href="#impl-FmtForward-for-ScalarVar">FmtForward</a></li><li><a href="#impl-From%3CT%3E-for-ScalarVar">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-ScalarVar">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-ScalarVar">Into&lt;U&gt;</a></li><li><a href="#impl-Pipe-for-ScalarVar">Pipe</a></li><li><a href="#impl-Pointable-for-ScalarVar">Pointable</a></li><li><a href="#impl-Tap-for-ScalarVar">Tap</a></li><li><a href="#impl-ToOwned-for-ScalarVar">ToOwned</a></li><li><a href="#impl-TryConv-for-ScalarVar">TryConv</a></li><li><a href="#impl-TryFrom%3CU%3E-for-ScalarVar">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-ScalarVar">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-ScalarVar">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-ScalarVar">WithSubscriber</a></li></ul></section><h2><a href="index.html">In halo2_gadgets::ecc::chip</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../../index.html">halo2_gadgets</a>::<wbr><a href="../index.html">ecc</a>::<wbr><a href="index.html">chip</a>::<wbr><a class="enum" href="#">ScalarVar</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/halo2_gadgets/ecc/chip.rs.html#391-408">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub enum ScalarVar {
BaseFieldElem(<a class="struct" href="../../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;Base, Base&gt;),
BaseFieldElem(AssignedCell&lt;Base, Base&gt;),
FullWidth,
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An enumeration of the possible types of scalars used in variable-base
multiplication.</p>
</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.BaseFieldElem" class="variant"><a href="#variant.BaseFieldElem" class="anchor">§</a><h3 class="code-header">BaseFieldElem(<a class="struct" href="../../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;Base, Base&gt;)</h3></section><div class="docblock"><p>An element of the elliptic curves base field, that is used as a scalar
</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.BaseFieldElem" class="variant"><a href="#variant.BaseFieldElem" class="anchor">§</a><h3 class="code-header">BaseFieldElem(AssignedCell&lt;Base, Base&gt;)</h3></section><div class="docblock"><p>An element of the elliptic curves base field, that is used as a scalar
in variable-base scalar mul.</p>
<p>It is not true in general that a scalar field element fits in a curves
base field, and in particular it is untrue for the Pallas curve, whose

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19,9 +19,9 @@ scalar multiplication more efficient. These window tables are tuned to full-widt
scalar multiplication.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-FixedPoint%3CC,+EccChip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#485-517">source</a><a href="#impl-FixedPoint%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; <a class="struct" href="struct.FixedPoint.html" title="struct halo2_gadgets::ecc::FixedPoint">FixedPoint</a>&lt;C, EccChip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.mul" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#488-508">source</a><h4 class="code-header">pub fn <a href="#method.mul" class="fn">mul</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
by: <a class="struct" href="struct.ScalarFixed.html" title="struct halo2_gadgets::ecc::ScalarFixed">ScalarFixed</a>&lt;C, EccChip&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="struct.Point.html" title="struct halo2_gadgets::ecc::Point">Point</a>&lt;C, EccChip&gt;, <a class="struct" href="struct.ScalarFixed.html" title="struct halo2_gadgets::ecc::ScalarFixed">ScalarFixed</a>&lt;C, EccChip&gt;), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Returns <code>[by] self</code>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="struct.Point.html" title="struct halo2_gadgets::ecc::Point">Point</a>&lt;C, EccChip&gt;, <a class="struct" href="struct.ScalarFixed.html" title="struct halo2_gadgets::ecc::ScalarFixed">ScalarFixed</a>&lt;C, EccChip&gt;), Error&gt;</h4></section></summary><div class="docblock"><p>Returns <code>[by] self</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_inner" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#511-516">source</a><h4 class="code-header">pub fn <a href="#method.from_inner" class="fn">from_inner</a>(
chip: EccChip,
inner: &lt;EccChip::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.FullScalar" title="type halo2_gadgets::ecc::FixedPoints::FullScalar">FullScalar</a>

View File

@ -19,9 +19,9 @@ scalar multiplication more efficient. These window tables are tuned to scalar
multiplication by base-field elements.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-FixedPointBaseField%3CC,+EccChip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#519-542">source</a><a href="#impl-FixedPointBaseField%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; <a class="struct" href="struct.FixedPointBaseField.html" title="struct halo2_gadgets::ecc::FixedPointBaseField">FixedPointBaseField</a>&lt;C, EccChip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.mul" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#522-533">source</a><h4 class="code-header">pub fn <a href="#method.mul" class="fn">mul</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
by: EccChip::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Point.html" title="struct halo2_gadgets::ecc::Point">Point</a>&lt;C, EccChip&gt;, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Returns <code>[by] self</code>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Point.html" title="struct halo2_gadgets::ecc::Point">Point</a>&lt;C, EccChip&gt;, Error&gt;</h4></section></summary><div class="docblock"><p>Returns <code>[by] self</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_inner" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#536-541">source</a><h4 class="code-header">pub fn <a href="#method.from_inner" class="fn">from_inner</a>(
chip: EccChip,
inner: &lt;EccChip::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.Base" title="type halo2_gadgets::ecc::FixedPoints::Base">Base</a>

View File

@ -16,9 +16,9 @@
</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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">FixedPointShort</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.from_inner">from_inner</a></li><li><a href="#method.mul">mul</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-FixedPointShort%3CC,+EccChip%3E">Clone</a></li><li><a href="#impl-Debug-for-FixedPointShort%3CC,+EccChip%3E">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-FixedPointShort%3CC,+EccChip%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-FixedPointShort%3CC,+EccChip%3E">Send</a></li><li><a href="#impl-Sync-for-FixedPointShort%3CC,+EccChip%3E">Sync</a></li><li><a href="#impl-Unpin-for-FixedPointShort%3CC,+EccChip%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-FixedPointShort%3CC,+EccChip%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-FixedPointShort%3CC,+EccChip%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-FixedPointShort%3CC,+EccChip%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-FixedPointShort%3CC,+EccChip%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-Conv-for-FixedPointShort%3CC,+EccChip%3E">Conv</a></li><li><a href="#impl-FmtForward-for-FixedPointShort%3CC,+EccChip%3E">FmtForward</a></li><li><a href="#impl-From%3CT%3E-for-FixedPointShort%3CC,+EccChip%3E">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-FixedPointShort%3CC,+EccChip%3E">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-FixedPointShort%3CC,+EccChip%3E">Into&lt;U&gt;</a></li><li><a href="#impl-Pipe-for-FixedPointShort%3CC,+EccChip%3E">Pipe</a></li><li><a href="#impl-Pointable-for-FixedPointShort%3CC,+EccChip%3E">Pointable</a></li><li><a href="#impl-Tap-for-FixedPointShort%3CC,+EccChip%3E">Tap</a></li><li><a href="#impl-ToOwned-for-FixedPointShort%3CC,+EccChip%3E">ToOwned</a></li><li><a href="#impl-TryConv-for-FixedPointShort%3CC,+EccChip%3E">TryConv</a></li><li><a href="#impl-TryFrom%3CU%3E-for-FixedPointShort%3CC,+EccChip%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-FixedPointShort%3CC,+EccChip%3E">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-FixedPointShort%3CC,+EccChip%3E">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-FixedPointShort%3CC,+EccChip%3E">WithSubscriber</a></li></ul></section><h2><a href="index.html">In halo2_gadgets::ecc</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">ecc</a>::<wbr><a class="struct" href="#">FixedPointShort</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/ecc.rs.html#480-483">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FixedPointShort&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; { /* private fields */ }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Precomputed multiples of a fixed point, for short signed scalar multiplication.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-FixedPointShort%3CC,+EccChip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#544-576">source</a><a href="#impl-FixedPointShort%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; <a class="struct" href="struct.FixedPointShort.html" title="struct halo2_gadgets::ecc::FixedPointShort">FixedPointShort</a>&lt;C, EccChip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.mul" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#547-567">source</a><h4 class="code-header">pub fn <a href="#method.mul" class="fn">mul</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
by: <a class="struct" href="struct.ScalarFixedShort.html" title="struct halo2_gadgets::ecc::ScalarFixedShort">ScalarFixedShort</a>&lt;C, EccChip&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="struct.Point.html" title="struct halo2_gadgets::ecc::Point">Point</a>&lt;C, EccChip&gt;, <a class="struct" href="struct.ScalarFixedShort.html" title="struct halo2_gadgets::ecc::ScalarFixedShort">ScalarFixedShort</a>&lt;C, EccChip&gt;), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Returns <code>[by] self</code>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="struct.Point.html" title="struct halo2_gadgets::ecc::Point">Point</a>&lt;C, EccChip&gt;, <a class="struct" href="struct.ScalarFixedShort.html" title="struct halo2_gadgets::ecc::ScalarFixedShort">ScalarFixedShort</a>&lt;C, EccChip&gt;), Error&gt;</h4></section></summary><div class="docblock"><p>Returns <code>[by] self</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_inner" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#570-575">source</a><h4 class="code-header">pub fn <a href="#method.from_inner" class="fn">from_inner</a>(
chip: EccChip,
inner: &lt;EccChip::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.ShortScalar" title="type halo2_gadgets::ecc::FixedPoints::ShortScalar">ShortScalar</a>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,9 +17,9 @@
for <a href="struct.FixedPoint.html" title="struct halo2_gadgets::ecc::FixedPoint"><code>FixedPoint</code></a> scalar multiplication.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ScalarFixed%3CC,+EccChip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#214-227">source</a><a href="#impl-ScalarFixed%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; <a class="struct" href="struct.ScalarFixed.html" title="struct halo2_gadgets::ecc::ScalarFixed">ScalarFixed</a>&lt;C, EccChip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#219-226">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
chip: EccChip,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Witnesses the given full-width scalar.</p>
layouter: impl Layouter&lt;C::Base&gt;,
value: Value&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, Error&gt;</h4></section></summary><div class="docblock"><p>Witnesses the given full-width scalar.</p>
<p>Depending on the <code>EccChip</code> implementation, this may either witness the scalar
immediately, or delay witnessing until its first use in <a href="struct.FixedPoint.html#method.mul" title="method halo2_gadgets::ecc::FixedPoint::mul"><code>FixedPoint::mul</code></a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Debug-for-ScalarFixed%3CC,+EccChip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#208">source</a><a href="#impl-Debug-for-ScalarFixed%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + CurveAffine, EccChip: <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="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ScalarFixed.html" title="struct halo2_gadgets::ecc::ScalarFixed">ScalarFixed</a>&lt;C, EccChip&gt;<span class="where fmt-newline">where

View File

@ -17,9 +17,9 @@
specific elliptic curve, to be used for <a href="struct.FixedPointShort.html" title="struct halo2_gadgets::ecc::FixedPointShort"><code>FixedPointShort</code></a> scalar multiplication.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ScalarFixedShort%3CC,+EccChip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#237-255">source</a><a href="#impl-ScalarFixedShort%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; <a class="struct" href="struct.ScalarFixedShort.html" title="struct halo2_gadgets::ecc::ScalarFixedShort">ScalarFixedShort</a>&lt;C, EccChip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#247-254">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
chip: EccChip,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
magnitude_sign: (EccChip::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, EccChip::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>)
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Converts the given signed short scalar.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, Error&gt;</h4></section></summary><div class="docblock"><p>Converts the given signed short scalar.</p>
<p><code>magnitude_sign</code> must be a tuple of two circuit-assigned values:</p>
<ul>
<li>An unsigned integer of at most 64 bits.</li>

View File

@ -16,16 +16,16 @@
</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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">ScalarVar</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.from_base">from_base</a></li><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-ScalarVar%3CC,+EccChip%3E">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-ScalarVar%3CC,+EccChip%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ScalarVar%3CC,+EccChip%3E">Send</a></li><li><a href="#impl-Sync-for-ScalarVar%3CC,+EccChip%3E">Sync</a></li><li><a href="#impl-Unpin-for-ScalarVar%3CC,+EccChip%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ScalarVar%3CC,+EccChip%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-ScalarVar%3CC,+EccChip%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-ScalarVar%3CC,+EccChip%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-ScalarVar%3CC,+EccChip%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-Conv-for-ScalarVar%3CC,+EccChip%3E">Conv</a></li><li><a href="#impl-FmtForward-for-ScalarVar%3CC,+EccChip%3E">FmtForward</a></li><li><a href="#impl-From%3CT%3E-for-ScalarVar%3CC,+EccChip%3E">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-ScalarVar%3CC,+EccChip%3E">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-ScalarVar%3CC,+EccChip%3E">Into&lt;U&gt;</a></li><li><a href="#impl-Pipe-for-ScalarVar%3CC,+EccChip%3E">Pipe</a></li><li><a href="#impl-Pointable-for-ScalarVar%3CC,+EccChip%3E">Pointable</a></li><li><a href="#impl-Tap-for-ScalarVar%3CC,+EccChip%3E">Tap</a></li><li><a href="#impl-TryConv-for-ScalarVar%3CC,+EccChip%3E">TryConv</a></li><li><a href="#impl-TryFrom%3CU%3E-for-ScalarVar%3CC,+EccChip%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-ScalarVar%3CC,+EccChip%3E">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-ScalarVar%3CC,+EccChip%3E">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-ScalarVar%3CC,+EccChip%3E">WithSubscriber</a></li></ul></section><h2><a href="index.html">In halo2_gadgets::ecc</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">ecc</a>::<wbr><a class="struct" href="#">ScalarVar</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/ecc.rs.html#174-177">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ScalarVar&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; { /* private fields */ }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An integer representing an element of the scalar field for a specific elliptic curve.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ScalarVar%3CC,+EccChip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#179-192">source</a><a href="#impl-ScalarVar%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; <a class="struct" href="struct.ScalarVar.html" title="struct halo2_gadgets::ecc::ScalarVar">ScalarVar</a>&lt;C, EccChip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#184-191">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
chip: EccChip,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Witnesses the given full-width scalar.</p>
layouter: impl Layouter&lt;C::Base&gt;,
value: Value&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, Error&gt;</h4></section></summary><div class="docblock"><p>Witnesses the given full-width scalar.</p>
<p>Depending on the <code>EccChip</code> implementation, this may either witness the scalar
immediately, or delay witnessing until its first use in <a href="struct.NonIdentityPoint.html#method.mul" title="method halo2_gadgets::ecc::NonIdentityPoint::mul"><code>NonIdentityPoint::mul</code></a>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ScalarVar%3CC,+EccChip%3E-1" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#194-204">source</a><a href="#impl-ScalarVar%3CC,+EccChip%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, EccChip: <a class="trait" href="trait.BaseFitsInScalarInstructions.html" title="trait halo2_gadgets::ecc::BaseFitsInScalarInstructions">BaseFitsInScalarInstructions</a>&lt;C&gt;&gt; <a class="struct" href="struct.ScalarVar.html" title="struct halo2_gadgets::ecc::ScalarVar">ScalarVar</a>&lt;C, EccChip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_base" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#196-203">source</a><h4 class="code-header">pub fn <a href="#method.from_base" class="fn">from_base</a>(
chip: EccChip,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
base: &amp;EccChip::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Constructs a scalar from an existing base-field element.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, Error&gt;</h4></section></summary><div class="docblock"><p>Constructs a scalar from an existing base-field element.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Debug-for-ScalarVar%3CC,+EccChip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#173">source</a><a href="#impl-Debug-for-ScalarVar%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + CurveAffine, EccChip: <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="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ScalarVar.html" title="struct halo2_gadgets::ecc::ScalarVar">ScalarVar</a>&lt;C, EccChip&gt;<span class="where fmt-newline">where
EccChip::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#173">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ScalarVar%3CC,+EccChip%3E" class="impl"><a href="#impl-RefUnwindSafe-for-ScalarVar%3CC,+EccChip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C, EccChip&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ScalarVar.html" title="struct halo2_gadgets::ecc::ScalarVar">ScalarVar</a>&lt;C, EccChip&gt;<span class="where fmt-newline">where
EccChip: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,

View File

@ -17,16 +17,16 @@
// Required method
fn <a href="#tymethod.scalar_var_from_base" class="fn">scalar_var_from_base</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
base: &amp;Self::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>, Error&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Instructions that can be implemented for a curve whose base field fits into
its scalar 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="toggle method-toggle" open><summary><section id="tymethod.scalar_var_from_base" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#155-159">source</a><h4 class="code-header">fn <a href="#tymethod.scalar_var_from_base" class="fn">scalar_var_from_base</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
base: &amp;Self::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Converts a base field element that exists as a variable in the circuit
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Converts a base field element that exists as a variable in the circuit
into a scalar to be used in variable-base scalar multiplication.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-BaseFitsInScalarInstructions%3CEpAffine%3E-for-EccChip%3CFixed%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc/chip.rs.html#597-614">source</a><a href="#impl-BaseFitsInScalarInstructions%3CEpAffine%3E-for-EccChip%3CFixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Fixed: <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt; <a class="trait" href="trait.BaseFitsInScalarInstructions.html" title="trait halo2_gadgets::ecc::BaseFitsInScalarInstructions">BaseFitsInScalarInstructions</a>&lt;EpAffine&gt; for <a class="struct" href="chip/struct.EccChip.html" title="struct halo2_gadgets::ecc::chip::EccChip">EccChip</a>&lt;Fixed&gt;<span class="where fmt-newline">where
&lt;Fixed as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.Base" title="type halo2_gadgets::ecc::FixedPoints::Base">Base</a>: <a class="trait" href="chip/trait.FixedPoint.html" title="trait halo2_gadgets::ecc::chip::FixedPoint">FixedPoint</a>&lt;Affine, FixedScalarKind = <a class="enum" href="chip/enum.BaseFieldElem.html" title="enum halo2_gadgets::ecc::chip::BaseFieldElem">BaseFieldElem</a>&gt;,

View File

@ -13,7 +13,7 @@
});
});
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">EccInstructions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.FixedPoints">FixedPoints</a></li><li><a href="#associatedtype.NonIdentityPoint">NonIdentityPoint</a></li><li><a href="#associatedtype.Point">Point</a></li><li><a href="#associatedtype.ScalarFixed">ScalarFixed</a></li><li><a href="#associatedtype.ScalarFixedShort">ScalarFixedShort</a></li><li><a href="#associatedtype.ScalarVar">ScalarVar</a></li><li><a href="#associatedtype.X">X</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.add">add</a></li><li><a href="#tymethod.add_incomplete">add_incomplete</a></li><li><a href="#tymethod.constrain_equal">constrain_equal</a></li><li><a href="#tymethod.extract_p">extract_p</a></li><li><a href="#tymethod.mul">mul</a></li><li><a href="#tymethod.mul_fixed">mul_fixed</a></li><li><a href="#tymethod.mul_fixed_base_field_elem">mul_fixed_base_field_elem</a></li><li><a href="#tymethod.mul_fixed_short">mul_fixed_short</a></li><li><a href="#tymethod.scalar_fixed_from_signed_short">scalar_fixed_from_signed_short</a></li><li><a href="#tymethod.witness_point">witness_point</a></li><li><a href="#tymethod.witness_point_non_id">witness_point_non_id</a></li><li><a href="#tymethod.witness_scalar_fixed">witness_scalar_fixed</a></li><li><a href="#tymethod.witness_scalar_var">witness_scalar_var</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::ecc</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">ecc</a>::<wbr><a class="trait" href="#">EccInstructions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/ecc.rs.html#16-148">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait EccInstructions&lt;C: CurveAffine&gt;: <a class="trait" href="../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;C::Base&gt; + <a class="trait" href="../utilities/trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;C::Base&gt; + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> {
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">EccInstructions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.FixedPoints">FixedPoints</a></li><li><a href="#associatedtype.NonIdentityPoint">NonIdentityPoint</a></li><li><a href="#associatedtype.Point">Point</a></li><li><a href="#associatedtype.ScalarFixed">ScalarFixed</a></li><li><a href="#associatedtype.ScalarFixedShort">ScalarFixedShort</a></li><li><a href="#associatedtype.ScalarVar">ScalarVar</a></li><li><a href="#associatedtype.X">X</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.add">add</a></li><li><a href="#tymethod.add_incomplete">add_incomplete</a></li><li><a href="#tymethod.constrain_equal">constrain_equal</a></li><li><a href="#tymethod.extract_p">extract_p</a></li><li><a href="#tymethod.mul">mul</a></li><li><a href="#tymethod.mul_fixed">mul_fixed</a></li><li><a href="#tymethod.mul_fixed_base_field_elem">mul_fixed_base_field_elem</a></li><li><a href="#tymethod.mul_fixed_short">mul_fixed_short</a></li><li><a href="#tymethod.scalar_fixed_from_signed_short">scalar_fixed_from_signed_short</a></li><li><a href="#tymethod.witness_point">witness_point</a></li><li><a href="#tymethod.witness_point_non_id">witness_point_non_id</a></li><li><a href="#tymethod.witness_scalar_fixed">witness_scalar_fixed</a></li><li><a href="#tymethod.witness_scalar_var">witness_scalar_var</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::ecc</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">ecc</a>::<wbr><a class="trait" href="#">EccInstructions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/ecc.rs.html#16-148">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait EccInstructions&lt;C: CurveAffine&gt;: Chip&lt;C::Base&gt; + <a class="trait" href="../utilities/trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;C::Base&gt; + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> {
type <a href="#associatedtype.ScalarVar" class="associatedtype">ScalarVar</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>;
type <a href="#associatedtype.ScalarFixed" class="associatedtype">ScalarFixed</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>;
type <a href="#associatedtype.ScalarFixedShort" class="associatedtype">ScalarFixedShort</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>;
@ -25,72 +25,72 @@
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 13 methods</span></summary> // Required methods
fn <a href="#tymethod.constrain_equal" class="fn">constrain_equal</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
a: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>,
b: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.witness_point" class="fn">witness_point</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
value: Value&lt;C&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.witness_point_non_id" class="fn">witness_point_non_id</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
value: Value&lt;C&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.witness_scalar_var" class="fn">witness_scalar_var</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
value: Value&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.witness_scalar_fixed" class="fn">witness_scalar_fixed</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
value: Value&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.scalar_fixed_from_signed_short" class="fn">scalar_fixed_from_signed_short</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
magnitude_sign: (Self::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Self::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>)
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.extract_p" class="fn">extract_p</a>&lt;Point: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt;(point: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Point</a>) -&gt; Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.X" title="type halo2_gadgets::ecc::EccInstructions::X">X</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.add_incomplete" class="fn">add_incomplete</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
a: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>,
b: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.add" class="fn">add</a>&lt;A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt;(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;A</a>,
b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;B</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.mul" class="fn">mul</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
scalar: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>,
base: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>), Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.mul_fixed" class="fn">mul_fixed</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
scalar: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>,
base: &amp;&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.FullScalar" title="type halo2_gadgets::ecc::FixedPoints::FullScalar">FullScalar</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>), Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.mul_fixed_short" class="fn">mul_fixed_short</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
scalar: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>,
base: &amp;&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.ShortScalar" title="type halo2_gadgets::ecc::FixedPoints::ShortScalar">ShortScalar</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>), Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.mul_fixed_base_field_elem" class="fn">mul_fixed_base_field_elem</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
base_field_elem: Self::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>,
base: &amp;&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.Base" title="type halo2_gadgets::ecc::FixedPoints::Base">Base</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Error&gt;;
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The set of circuit instructions required to use the ECC gadgets.</p>
</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.ScalarVar" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#24">source</a><h4 class="code-header">type <a href="#associatedtype.ScalarVar" class="associatedtype">ScalarVar</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a></h4></section></summary><div class="docblock"><p>Variable representing a scalar used in variable-base scalar mul.</p>
<p>This type is treated as a full-width scalar. However, if <code>Self</code> implements
@ -111,81 +111,81 @@ TODO: When associated consts can be used as const generics, introduce
and use them to differentiate <code>FixedPoints</code> types.</p>
</div></details></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.constrain_equal" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#47-52">source</a><h4 class="code-header">fn <a href="#tymethod.constrain_equal" class="fn">constrain_equal</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
a: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>,
b: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Constrains point <code>a</code> to be equal in value to point <code>b</code>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Constrains point <code>a</code> to be equal in value to point <code>b</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.witness_point" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#57-61">source</a><h4 class="code-header">fn <a href="#tymethod.witness_point" class="fn">witness_point</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Witnesses the given point as a private input to the circuit.
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
value: Value&lt;C&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Witnesses the given point as a private input to the circuit.
This allows the point to be the identity, mapped to (0, 0) in
affine coordinates.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.witness_point_non_id" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#65-69">source</a><h4 class="code-header">fn <a href="#tymethod.witness_point_non_id" class="fn">witness_point_non_id</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Witnesses the given point as a private input to the circuit.
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
value: Value&lt;C&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Witnesses the given point as a private input to the circuit.
This returns an error if the point is the identity.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.witness_scalar_var" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#72-76">source</a><h4 class="code-header">fn <a href="#tymethod.witness_scalar_var" class="fn">witness_scalar_var</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Witnesses a full-width scalar to be used in variable-base multiplication.</p>
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
value: Value&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Witnesses a full-width scalar to be used in variable-base multiplication.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.witness_scalar_fixed" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#79-83">source</a><h4 class="code-header">fn <a href="#tymethod.witness_scalar_fixed" class="fn">witness_scalar_fixed</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Witnesses a full-width scalar to be used in fixed-base multiplication.</p>
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
value: Value&lt;C::Scalar&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Witnesses a full-width scalar to be used in fixed-base multiplication.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.scalar_fixed_from_signed_short" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#87-91">source</a><h4 class="code-header">fn <a href="#tymethod.scalar_fixed_from_signed_short" class="fn">scalar_fixed_from_signed_short</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
magnitude_sign: (Self::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Self::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>)
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Converts a magnitude and sign that exists as variables in the circuit into a
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Converts a magnitude and sign that exists as variables in the circuit into a
signed short scalar to be used in fixed-base scalar multiplication.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.extract_p" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#94">source</a><h4 class="code-header">fn <a href="#tymethod.extract_p" class="fn">extract_p</a>&lt;Point: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt;(point: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Point</a>) -&gt; Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.X" title="type halo2_gadgets::ecc::EccInstructions::X">X</a></h4></section></summary><div class="docblock"><p>Extracts the x-coordinate of a point.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.add_incomplete" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#99-104">source</a><h4 class="code-header">fn <a href="#tymethod.add_incomplete" class="fn">add_incomplete</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
a: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>,
b: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Performs incomplete point addition, returning <code>a + b</code>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Performs incomplete point addition, returning <code>a + b</code>.</p>
<p>This returns an error in exceptional cases.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.add" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#107-112">source</a><h4 class="code-header">fn <a href="#tymethod.add" class="fn">add</a>&lt;A: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, B: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt;(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
a: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;A</a>,
b: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;B</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Performs complete point addition, returning <code>a + b</code>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Performs complete point addition, returning <code>a + b</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.mul" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#115-120">source</a><h4 class="code-header">fn <a href="#tymethod.mul" class="fn">mul</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
scalar: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>,
base: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::ecc::EccInstructions::NonIdentityPoint">NonIdentityPoint</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Performs variable-base scalar multiplication, returning <code>[scalar] base</code>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarVar" title="type halo2_gadgets::ecc::EccInstructions::ScalarVar">ScalarVar</a>), Error&gt;</h4></section></summary><div class="docblock"><p>Performs variable-base scalar multiplication, returning <code>[scalar] base</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.mul_fixed" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#123-128">source</a><h4 class="code-header">fn <a href="#tymethod.mul_fixed" class="fn">mul_fixed</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
scalar: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>,
base: &amp;&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.FullScalar" title="type halo2_gadgets::ecc::FixedPoints::FullScalar">FullScalar</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Performs fixed-base scalar multiplication using a full-width scalar, returning <code>[scalar] base</code>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixed" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixed">ScalarFixed</a>), Error&gt;</h4></section></summary><div class="docblock"><p>Performs fixed-base scalar multiplication using a full-width scalar, returning <code>[scalar] base</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.mul_fixed_short" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#132-137">source</a><h4 class="code-header">fn <a href="#tymethod.mul_fixed_short" class="fn">mul_fixed_short</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
scalar: &amp;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>,
base: &amp;&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.ShortScalar" title="type halo2_gadgets::ecc::FixedPoints::ShortScalar">ShortScalar</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Performs fixed-base scalar multiplication using a short signed scalar, returning
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.ScalarFixedShort" title="type halo2_gadgets::ecc::EccInstructions::ScalarFixedShort">ScalarFixedShort</a>), Error&gt;</h4></section></summary><div class="docblock"><p>Performs fixed-base scalar multiplication using a short signed scalar, returning
<code>[scalar] base</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.mul_fixed_base_field_elem" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc.rs.html#142-147">source</a><h4 class="code-header">fn <a href="#tymethod.mul_fixed_base_field_elem" class="fn">mul_fixed_base_field_elem</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: &amp;mut impl Layouter&lt;C::Base&gt;,
base_field_elem: Self::<a class="associatedtype" href="../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>,
base: &amp;&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::ecc::EccInstructions::FixedPoints">FixedPoints</a> as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;C&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.Base" title="type halo2_gadgets::ecc::FixedPoints::Base">Base</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Performs fixed-base scalar multiplication using a base field element as the scalar.
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.EccInstructions.html#associatedtype.Point" title="type halo2_gadgets::ecc::EccInstructions::Point">Point</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Performs fixed-base scalar multiplication using a base field element as the scalar.
In the current implementation, this base field element must be output from another
instruction.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-EccInstructions%3CEpAffine%3E-for-EccChip%3CFixed%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc/chip.rs.html#410-595">source</a><a href="#impl-EccInstructions%3CEpAffine%3E-for-EccChip%3CFixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Fixed: <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt; <a class="trait" href="trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;EpAffine&gt; for <a class="struct" href="chip/struct.EccChip.html" title="struct halo2_gadgets::ecc::chip::EccChip">EccChip</a>&lt;Fixed&gt;<span class="where fmt-newline">where
&lt;Fixed as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.Base" title="type halo2_gadgets::ecc::FixedPoints::Base">Base</a>: <a class="trait" href="chip/trait.FixedPoint.html" title="trait halo2_gadgets::ecc::chip::FixedPoint">FixedPoint</a>&lt;Affine, FixedScalarKind = <a class="enum" href="chip/enum.BaseFieldElem.html" title="enum halo2_gadgets::ecc::chip::BaseFieldElem">BaseFieldElem</a>&gt;,
&lt;Fixed as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.FullScalar" title="type halo2_gadgets::ecc::FixedPoints::FullScalar">FullScalar</a>: <a class="trait" href="chip/trait.FixedPoint.html" title="trait halo2_gadgets::ecc::chip::FixedPoint">FixedPoint</a>&lt;Affine, FixedScalarKind = <a class="enum" href="chip/enum.FullScalar.html" title="enum halo2_gadgets::ecc::chip::FullScalar">FullScalar</a>&gt;,
&lt;Fixed as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.ShortScalar" title="type halo2_gadgets::ecc::FixedPoints::ShortScalar">ShortScalar</a>: <a class="trait" href="chip/trait.FixedPoint.html" title="trait halo2_gadgets::ecc::chip::FixedPoint">FixedPoint</a>&lt;Affine, FixedScalarKind = <a class="enum" href="chip/enum.ShortScalar.html" title="enum halo2_gadgets::ecc::chip::ShortScalar">ShortScalar</a>&gt;,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.ScalarFixed-1" class="associatedtype trait-impl"><a href="#associatedtype.ScalarFixed-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.ScalarFixed" class="associatedtype">ScalarFixed</a> = <a class="struct" href="chip/struct.EccScalarFixed.html" title="struct halo2_gadgets::ecc::chip::EccScalarFixed">EccScalarFixed</a></h4></section><section id="associatedtype.ScalarFixedShort-1" class="associatedtype trait-impl"><a href="#associatedtype.ScalarFixedShort-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.ScalarFixedShort" class="associatedtype">ScalarFixedShort</a> = <a class="struct" href="chip/struct.EccScalarFixedShort.html" title="struct halo2_gadgets::ecc::chip::EccScalarFixedShort">EccScalarFixedShort</a></h4></section><section id="associatedtype.ScalarVar-1" class="associatedtype trait-impl"><a href="#associatedtype.ScalarVar-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.ScalarVar" class="associatedtype">ScalarVar</a> = <a class="enum" href="chip/enum.ScalarVar.html" title="enum halo2_gadgets::ecc::chip::ScalarVar">ScalarVar</a></h4></section><section id="associatedtype.Point-1" class="associatedtype trait-impl"><a href="#associatedtype.Point-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Point" class="associatedtype">Point</a> = <a class="struct" href="chip/struct.EccPoint.html" title="struct halo2_gadgets::ecc::chip::EccPoint">EccPoint</a></h4></section><section id="associatedtype.NonIdentityPoint-1" class="associatedtype trait-impl"><a href="#associatedtype.NonIdentityPoint-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.NonIdentityPoint" class="associatedtype">NonIdentityPoint</a> = <a class="struct" href="chip/struct.NonIdentityEccPoint.html" title="struct halo2_gadgets::ecc::chip::NonIdentityEccPoint">NonIdentityEccPoint</a></h4></section><section id="associatedtype.X-1" class="associatedtype trait-impl"><a href="#associatedtype.X-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;Fp, Fp&gt;</h4></section><section id="associatedtype.FixedPoints-1" class="associatedtype trait-impl"><a href="#associatedtype.FixedPoints-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.FixedPoints" class="associatedtype">FixedPoints</a> = Fixed</h4></section></div></details></div><script src="../../implementors/halo2_gadgets/ecc/trait.EccInstructions.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>
&lt;Fixed as <a class="trait" href="trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt;::<a class="associatedtype" href="trait.FixedPoints.html#associatedtype.ShortScalar" title="type halo2_gadgets::ecc::FixedPoints::ShortScalar">ShortScalar</a>: <a class="trait" href="chip/trait.FixedPoint.html" title="trait halo2_gadgets::ecc::chip::FixedPoint">FixedPoint</a>&lt;Affine, FixedScalarKind = <a class="enum" href="chip/enum.ShortScalar.html" title="enum halo2_gadgets::ecc::chip::ShortScalar">ShortScalar</a>&gt;,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.ScalarFixed-1" class="associatedtype trait-impl"><a href="#associatedtype.ScalarFixed-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.ScalarFixed" class="associatedtype">ScalarFixed</a> = <a class="struct" href="chip/struct.EccScalarFixed.html" title="struct halo2_gadgets::ecc::chip::EccScalarFixed">EccScalarFixed</a></h4></section><section id="associatedtype.ScalarFixedShort-1" class="associatedtype trait-impl"><a href="#associatedtype.ScalarFixedShort-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.ScalarFixedShort" class="associatedtype">ScalarFixedShort</a> = <a class="struct" href="chip/struct.EccScalarFixedShort.html" title="struct halo2_gadgets::ecc::chip::EccScalarFixedShort">EccScalarFixedShort</a></h4></section><section id="associatedtype.ScalarVar-1" class="associatedtype trait-impl"><a href="#associatedtype.ScalarVar-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.ScalarVar" class="associatedtype">ScalarVar</a> = <a class="enum" href="chip/enum.ScalarVar.html" title="enum halo2_gadgets::ecc::chip::ScalarVar">ScalarVar</a></h4></section><section id="associatedtype.Point-1" class="associatedtype trait-impl"><a href="#associatedtype.Point-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Point" class="associatedtype">Point</a> = <a class="struct" href="chip/struct.EccPoint.html" title="struct halo2_gadgets::ecc::chip::EccPoint">EccPoint</a></h4></section><section id="associatedtype.NonIdentityPoint-1" class="associatedtype trait-impl"><a href="#associatedtype.NonIdentityPoint-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.NonIdentityPoint" class="associatedtype">NonIdentityPoint</a> = <a class="struct" href="chip/struct.NonIdentityEccPoint.html" title="struct halo2_gadgets::ecc::chip::NonIdentityEccPoint">NonIdentityEccPoint</a></h4></section><section id="associatedtype.X-1" class="associatedtype trait-impl"><a href="#associatedtype.X-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = AssignedCell&lt;Fp, Fp&gt;</h4></section><section id="associatedtype.FixedPoints-1" class="associatedtype trait-impl"><a href="#associatedtype.FixedPoints-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.FixedPoints" class="associatedtype">FixedPoints</a> = Fixed</h4></section></div></details></div><script src="../../implementors/halo2_gadgets/ecc/trait.EccInstructions.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

View File

@ -14,10 +14,10 @@
});
</script>
</head><body class="rustdoc enum"><!--[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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">PaddedWord</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block"><li><a href="#variant.Message">Message</a></li><li><a href="#variant.Padding">Padding</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-PaddedWord%3CF%3E">Clone</a></li><li><a href="#impl-Debug-for-PaddedWord%3CF%3E">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-PaddedWord%3CF%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-PaddedWord%3CF%3E">Send</a></li><li><a href="#impl-Sync-for-PaddedWord%3CF%3E">Sync</a></li><li><a href="#impl-Unpin-for-PaddedWord%3CF%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-PaddedWord%3CF%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-PaddedWord%3CF%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-PaddedWord%3CF%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-PaddedWord%3CF%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-Conv-for-PaddedWord%3CF%3E">Conv</a></li><li><a href="#impl-FmtForward-for-PaddedWord%3CF%3E">FmtForward</a></li><li><a href="#impl-From%3CT%3E-for-PaddedWord%3CF%3E">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-PaddedWord%3CF%3E">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-PaddedWord%3CF%3E">Into&lt;U&gt;</a></li><li><a href="#impl-Pipe-for-PaddedWord%3CF%3E">Pipe</a></li><li><a href="#impl-Pointable-for-PaddedWord%3CF%3E">Pointable</a></li><li><a href="#impl-Tap-for-PaddedWord%3CF%3E">Tap</a></li><li><a href="#impl-ToOwned-for-PaddedWord%3CF%3E">ToOwned</a></li><li><a href="#impl-TryConv-for-PaddedWord%3CF%3E">TryConv</a></li><li><a href="#impl-TryFrom%3CU%3E-for-PaddedWord%3CF%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-PaddedWord%3CF%3E">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-PaddedWord%3CF%3E">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-PaddedWord%3CF%3E">WithSubscriber</a></li></ul></section><h2><a href="index.html">In halo2_gadgets::poseidon</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">poseidon</a>::<wbr><a class="enum" href="#">PaddedWord</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/poseidon.rs.html#21-26">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub enum PaddedWord&lt;F: Field&gt; {
Message(<a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;),
Message(AssignedCell&lt;F, F&gt;),
Padding(F),
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A word from the padded input to a Poseidon sponge.</p>
</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Message" class="variant"><a href="#variant.Message" class="anchor">§</a><h3 class="code-header">Message(<a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;)</h3></section><div class="docblock"><p>A message word provided by the prover.</p>
</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Message" class="variant"><a href="#variant.Message" class="anchor">§</a><h3 class="code-header">Message(AssignedCell&lt;F, F&gt;)</h3></section><div class="docblock"><p>A message word provided by the prover.</p>
</div><section id="variant.Padding" class="variant"><a href="#variant.Padding" class="anchor">§</a><h3 class="code-header">Padding(F)</h3></section><div class="docblock"><p>A padding word, that will be fixed in the circuit parameters.</p>
</div></div><h2 id="trait-implementations" class="small-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-Clone-for-PaddedWord%3CF%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#20">source</a><a href="#impl-Clone-for-PaddedWord%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + Field&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#20">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-PaddedWord%3CF%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#20">source</a><a href="#impl-Debug-for-PaddedWord%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + Field&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#20">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-PaddedWord%3CF%3E" class="impl"><a href="#impl-RefUnwindSafe-for-PaddedWord%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;<span class="where fmt-newline">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-PaddedWord%3CF%3E" class="impl"><a href="#impl-Send-for-PaddedWord%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;</h3></section><section id="impl-Sync-for-PaddedWord%3CF%3E" class="impl"><a href="#impl-Sync-for-PaddedWord%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;</h3></section><section id="impl-Unpin-for-PaddedWord%3CF%3E" class="impl"><a href="#impl-Unpin-for-PaddedWord%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;<span class="where fmt-newline">where

File diff suppressed because one or more lines are too long

View File

@ -17,31 +17,31 @@
<p>The chip is implemented using a single round per row for full rounds, and two rounds
per row for partial rounds.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#46-208">source</a><a href="#impl-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.configure" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#56-202">source</a><h4 class="code-header">pub fn <a href="#method.configure" class="fn">configure</a>&lt;S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, WIDTH, RATE&gt;&gt;(
meta: &amp;mut <a class="struct" href="../../halo2_proofs/plonk/circuit/struct.ConstraintSystem.html" title="struct halo2_proofs::plonk::circuit::ConstraintSystem">ConstraintSystem</a>&lt;F&gt;,
state: [<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Advice.html" title="struct halo2_proofs::plonk::circuit::Advice">Advice</a>&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">WIDTH</a>],
partial_sbox: <a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Advice.html" title="struct halo2_proofs::plonk::circuit::Advice">Advice</a>&gt;,
rc_a: [<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Fixed.html" title="struct halo2_proofs::plonk::circuit::Fixed">Fixed</a>&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">WIDTH</a>],
rc_b: [<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Fixed.html" title="struct halo2_proofs::plonk::circuit::Fixed">Fixed</a>&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">WIDTH</a>]
meta: &amp;mut ConstraintSystem&lt;F&gt;,
state: [Column&lt;Advice&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">WIDTH</a>],
partial_sbox: Column&lt;Advice&gt;,
rc_a: [Column&lt;Fixed&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">WIDTH</a>],
rc_b: [Column&lt;Fixed&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">WIDTH</a>]
) -&gt; <a class="struct" href="struct.Pow5Config.html" title="struct halo2_gadgets::poseidon::Pow5Config">Pow5Config</a>&lt;F, WIDTH, RATE&gt;</h4></section></summary><div class="docblock"><p>Configures this chip for use in a circuit.</p>
<h5 id="side-effects"><a href="#side-effects">Side-effects</a></h5>
<p>All columns in <code>state</code> will be equality-enabled.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.construct" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#205-207">source</a><h4 class="code-header">pub fn <a href="#method.construct" class="fn">construct</a>(config: <a class="struct" href="struct.Pow5Config.html" title="struct halo2_gadgets::poseidon::Pow5Config">Pow5Config</a>&lt;F, WIDTH, RATE&gt;) -&gt; Self</h4></section></summary><div class="docblock"><p>Construct a <a href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip"><code>Pow5Chip</code></a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Chip%3CF%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#210-221">source</a><a href="#impl-Chip%3CF%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;F&gt; for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Config" class="associatedtype trait-impl"><a href="#associatedtype.Config" class="anchor">§</a><h4 class="code-header">type <a href="../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Config" class="associatedtype">Config</a> = <a class="struct" href="struct.Pow5Config.html" title="struct halo2_gadgets::poseidon::Pow5Config">Pow5Config</a>&lt;F, WIDTH, RATE&gt;</h4></section></summary><div class='docblock'>A type that holds the configuration for this chip, and any other state it may need
during circuit synthesis, that can be derived during <a href="../../halo2_proofs/plonk/circuit/trait.Circuit.html#tymethod.configure" title="associated function halo2_proofs::plonk::circuit::Circuit::configure"><code>Circuit::configure</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.Loaded" class="associatedtype trait-impl"><a href="#associatedtype.Loaded" class="anchor">§</a><h4 class="code-header">type <a href="../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Loaded" class="associatedtype">Loaded</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section></summary><div class='docblock'>A type that holds any general chip state that needs to be loaded at the start of
<a href="../../halo2_proofs/plonk/circuit/trait.Circuit.html#tymethod.synthesize" title="method halo2_proofs::plonk::circuit::Circuit::synthesize"><code>Circuit::synthesize</code></a>. This might simply be <code>()</code> for some chips.</div></details><details class="toggle method-toggle" open><summary><section id="method.config" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#214-216">source</a><a href="#method.config" class="anchor">§</a><h4 class="code-header">fn <a href="../../halo2_proofs/circuit/trait.Chip.html#tymethod.config" class="fn">config</a>(&amp;self) -&gt; &amp;Self::<a class="associatedtype" href="../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Config" title="type halo2_proofs::circuit::Chip::Config">Config</a></h4></section></summary><div class='docblock'>The chip holds its own configuration.</div></details><details class="toggle method-toggle" open><summary><section id="method.loaded" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#218-220">source</a><a href="#method.loaded" class="anchor">§</a><h4 class="code-header">fn <a href="../../halo2_proofs/circuit/trait.Chip.html#tymethod.loaded" class="fn">loaded</a>(&amp;self) -&gt; &amp;Self::<a class="associatedtype" href="../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Loaded" title="type halo2_proofs::circuit::Chip::Loaded">Loaded</a></h4></section></summary><div class='docblock'>Provides access to general chip state loaded at the beginning of circuit
synthesis. <a href="../../halo2_proofs/circuit/trait.Chip.html#tymethod.loaded">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#41">source</a><a href="#impl-Debug-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + Field, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#41">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PoseidonInstructions%3CF,+S,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#223-271">source</a><a href="#impl-PoseidonInstructions%3CF,+S,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, WIDTH, RATE&gt;, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.PoseidonInstructions.html" title="trait halo2_gadgets::poseidon::PoseidonInstructions">PoseidonInstructions</a>&lt;F, S, WIDTH, RATE&gt; for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Word" class="associatedtype trait-impl"><a href="#associatedtype.Word" class="anchor">§</a><h4 class="code-header">type <a href="trait.PoseidonInstructions.html#associatedtype.Word" class="associatedtype">Word</a> = <a class="struct" href="struct.StateWord.html" title="struct halo2_gadgets::poseidon::StateWord">StateWord</a>&lt;F&gt;</h4></section></summary><div class='docblock'>Variable representing the word over which the Poseidon permutation operates.</div></details><details class="toggle method-toggle" open><summary><section id="method.permute" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#228-270">source</a><a href="#method.permute" class="anchor">§</a><h4 class="code-header">fn <a href="trait.PoseidonInstructions.html#tymethod.permute" class="fn">permute</a>(
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Chip%3CF%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#210-221">source</a><a href="#impl-Chip%3CF%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; Chip&lt;F&gt; for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Config" class="associatedtype trait-impl"><a href="#associatedtype.Config" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Config</a> = <a class="struct" href="struct.Pow5Config.html" title="struct halo2_gadgets::poseidon::Pow5Config">Pow5Config</a>&lt;F, WIDTH, RATE&gt;</h4></section></summary><div class='docblock'>A type that holds the configuration for this chip, and any other state it may need
during circuit synthesis, that can be derived during <a href="crate::plonk::Circuit::configure"><code>Circuit::configure</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.Loaded" class="associatedtype trait-impl"><a href="#associatedtype.Loaded" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Loaded</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section></summary><div class='docblock'>A type that holds any general chip state that needs to be loaded at the start of
<a href="crate::plonk::Circuit::synthesize"><code>Circuit::synthesize</code></a>. This might simply be <code>()</code> for some chips.</div></details><details class="toggle method-toggle" open><summary><section id="method.config" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#214-216">source</a><a href="#method.config" class="anchor">§</a><h4 class="code-header">fn <a class="fn">config</a>(&amp;self) -&gt; &amp;Self::Config</h4></section></summary><div class='docblock'>The chip holds its own configuration.</div></details><details class="toggle method-toggle" open><summary><section id="method.loaded" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#218-220">source</a><a href="#method.loaded" class="anchor">§</a><h4 class="code-header">fn <a class="fn">loaded</a>(&amp;self) -&gt; &amp;Self::Loaded</h4></section></summary><div class='docblock'>Provides access to general chip state loaded at the beginning of circuit
synthesis. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#41">source</a><a href="#impl-Debug-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + Field, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#41">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PoseidonInstructions%3CF,+S,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#223-271">source</a><a href="#impl-PoseidonInstructions%3CF,+S,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, WIDTH, RATE&gt;, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.PoseidonInstructions.html" title="trait halo2_gadgets::poseidon::PoseidonInstructions">PoseidonInstructions</a>&lt;F, S, WIDTH, RATE&gt; for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Word" class="associatedtype trait-impl"><a href="#associatedtype.Word" class="anchor">§</a><h4 class="code-header">type <a href="trait.PoseidonInstructions.html#associatedtype.Word" class="associatedtype">Word</a> = <a class="struct" href="struct.StateWord.html" title="struct halo2_gadgets::poseidon::StateWord">StateWord</a>&lt;F&gt;</h4></section></summary><div class='docblock'>Variable representing the word over which the Poseidon permutation operates.</div></details><details class="toggle method-toggle" open><summary><section id="method.permute" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#228-270">source</a><a href="#method.permute" class="anchor">§</a><h4 class="code-header">fn <a href="trait.PoseidonInstructions.html#tymethod.permute" class="fn">permute</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
initial_state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>]
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Applies the Poseidon permutation to the given state.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PoseidonSpongeInstructions%3CF,+S,+D,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#273-400">source</a><a href="#impl-PoseidonSpongeInstructions%3CF,+S,+D,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, WIDTH, RATE&gt;, D: <a class="trait" href="primitives/trait.Domain.html" title="trait halo2_gadgets::poseidon::primitives::Domain">Domain</a>&lt;F, RATE&gt;, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.PoseidonSpongeInstructions.html" title="trait halo2_gadgets::poseidon::PoseidonSpongeInstructions">PoseidonSpongeInstructions</a>&lt;F, S, D, WIDTH, RATE&gt; for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.initial_state" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#281-312">source</a><a href="#method.initial_state" class="anchor">§</a><h4 class="code-header">fn <a href="trait.PoseidonSpongeInstructions.html#tymethod.initial_state" class="fn">initial_state</a>(
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;</h4></section></summary><div class='docblock'>Applies the Poseidon permutation to the given state.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PoseidonSpongeInstructions%3CF,+S,+D,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#273-400">source</a><a href="#impl-PoseidonSpongeInstructions%3CF,+S,+D,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, WIDTH, RATE&gt;, D: <a class="trait" href="primitives/trait.Domain.html" title="trait halo2_gadgets::poseidon::primitives::Domain">Domain</a>&lt;F, RATE&gt;, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.PoseidonSpongeInstructions.html" title="trait halo2_gadgets::poseidon::PoseidonSpongeInstructions">PoseidonSpongeInstructions</a>&lt;F, S, D, WIDTH, RATE&gt; for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.initial_state" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#281-312">source</a><a href="#method.initial_state" class="anchor">§</a><h4 class="code-header">fn <a href="trait.PoseidonSpongeInstructions.html#tymethod.initial_state" class="fn">initial_state</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Returns the initial empty state for the given domain.</div></details><details class="toggle method-toggle" open><summary><section id="method.add_input" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#314-388">source</a><a href="#method.add_input" class="anchor">§</a><h4 class="code-header">fn <a href="trait.PoseidonSpongeInstructions.html#tymethod.add_input" class="fn">add_input</a>(
layouter: &amp;mut impl Layouter&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;</h4></section></summary><div class='docblock'>Returns the initial empty state for the given domain.</div></details><details class="toggle method-toggle" open><summary><section id="method.add_input" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#314-388">source</a><a href="#method.add_input" class="anchor">§</a><h4 class="code-header">fn <a href="trait.PoseidonSpongeInstructions.html#tymethod.add_input" class="fn">add_input</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
initial_state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>],
input: &amp;<a class="struct" href="primitives/struct.Absorbing.html" title="struct halo2_gadgets::poseidon::primitives::Absorbing">Absorbing</a>&lt;<a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;, RATE&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Adds the given input to the state.</div></details><details class="toggle method-toggle" open><summary><section id="method.get_output" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#390-399">source</a><a href="#method.get_output" class="anchor">§</a><h4 class="code-header">fn <a href="trait.PoseidonSpongeInstructions.html#tymethod.get_output" class="fn">get_output</a>(state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>]) -&gt; <a class="struct" href="primitives/struct.Squeezing.html" title="struct halo2_gadgets::poseidon::primitives::Squeezing">Squeezing</a>&lt;Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>, RATE&gt;</h4></section></summary><div class='docblock'>Extracts sponge output from the given state.</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;<span class="where fmt-newline">where
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;</h4></section></summary><div class='docblock'>Adds the given input to the state.</div></details><details class="toggle method-toggle" open><summary><section id="method.get_output" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#390-399">source</a><a href="#method.get_output" class="anchor">§</a><h4 class="code-header">fn <a href="trait.PoseidonSpongeInstructions.html#tymethod.get_output" class="fn">get_output</a>(state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>]) -&gt; <a class="struct" href="primitives/struct.Squeezing.html" title="struct halo2_gadgets::poseidon::primitives::Squeezing">Squeezing</a>&lt;Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>, RATE&gt;</h4></section></summary><div class='docblock'>Extracts sponge output from the given state.</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;<span class="where fmt-newline">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a href="#impl-Send-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section><section id="impl-Sync-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a href="#impl-Sync-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section><section id="impl-Unpin-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a href="#impl-Unpin-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;<span class="where fmt-newline">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a href="#impl-UnwindSafe-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;<span class="where fmt-newline">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-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-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,20 +13,20 @@
});
});
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">PoseidonInstructions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Word">Word</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.permute">permute</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::poseidon</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">poseidon</a>::<wbr><a class="trait" href="#">PoseidonInstructions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/poseidon.rs.html#29-41">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait PoseidonInstructions&lt;F: Field, S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, T, RATE&gt;, const T: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;: <a class="trait" href="../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;F&gt; {
type <a href="#associatedtype.Word" class="associatedtype">Word</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;&gt;;
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">PoseidonInstructions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Word">Word</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.permute">permute</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::poseidon</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">poseidon</a>::<wbr><a class="trait" href="#">PoseidonInstructions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/poseidon.rs.html#29-41">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait PoseidonInstructions&lt;F: Field, S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, T, RATE&gt;, const T: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;: Chip&lt;F&gt; {
type <a href="#associatedtype.Word" class="associatedtype">Word</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;AssignedCell&lt;F, F&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;AssignedCell&lt;F, F&gt;&gt;;
// Required method
fn <a href="#tymethod.permute" class="fn">permute</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
initial_state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>]
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The set of circuit instructions required to use the Poseidon permutation.</p>
</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Word" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#33">source</a><h4 class="code-header">type <a href="#associatedtype.Word" class="associatedtype">Word</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;&gt;</h4></section></summary><div class="docblock"><p>Variable representing the word over which the Poseidon permutation operates.</p>
</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Word" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#33">source</a><h4 class="code-header">type <a href="#associatedtype.Word" class="associatedtype">Word</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;AssignedCell&lt;F, F&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;AssignedCell&lt;F, F&gt;&gt;</h4></section></summary><div class="docblock"><p>Variable representing the word over which the Poseidon permutation operates.</p>
</div></details></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.permute" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#36-40">source</a><h4 class="code-header">fn <a href="#tymethod.permute" class="fn">permute</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
initial_state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>]
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Applies the Poseidon permutation to the given state.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;</h4></section></summary><div class="docblock"><p>Applies the Poseidon permutation to the given state.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-PoseidonInstructions%3CF,+S,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#223-271">source</a><a href="#impl-PoseidonInstructions%3CF,+S,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, WIDTH, RATE&gt;, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.PoseidonInstructions.html" title="trait halo2_gadgets::poseidon::PoseidonInstructions">PoseidonInstructions</a>&lt;F, S, WIDTH, RATE&gt; for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Word-1" class="associatedtype trait-impl"><a href="#associatedtype.Word-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Word" class="associatedtype">Word</a> = <a class="struct" href="struct.StateWord.html" title="struct halo2_gadgets::poseidon::StateWord">StateWord</a>&lt;F&gt;</h4></section></div></details></div><script src="../../implementors/halo2_gadgets/poseidon/trait.PoseidonInstructions.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

View File

@ -17,25 +17,25 @@
// Required methods
fn <a href="#tymethod.initial_state" class="fn">initial_state</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
layouter: &amp;mut impl Layouter&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.add_input" class="fn">add_input</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
initial_state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>],
input: &amp;<a class="struct" href="primitives/struct.Absorbing.html" title="struct halo2_gadgets::poseidon::primitives::Absorbing">Absorbing</a>&lt;<a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;, RATE&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.get_output" class="fn">get_output</a>(state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>]) -&gt; <a class="struct" href="primitives/struct.Squeezing.html" title="struct halo2_gadgets::poseidon::primitives::Squeezing">Squeezing</a>&lt;Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>, RATE&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The set of circuit instructions required to use the <a href="struct.Sponge.html" title="struct halo2_gadgets::poseidon::Sponge"><code>Sponge</code></a> and <a href="struct.Hash.html" title="struct halo2_gadgets::poseidon::Hash"><code>Hash</code></a> gadgets.</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="toggle method-toggle" open><summary><section id="tymethod.initial_state" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#55-56">source</a><h4 class="code-header">fn <a href="#tymethod.initial_state" class="fn">initial_state</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the initial empty state for the given domain.</p>
layouter: &amp;mut impl Layouter&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;</h4></section></summary><div class="docblock"><p>Returns the initial empty state for the given domain.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.add_input" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#59-64">source</a><h4 class="code-header">fn <a href="#tymethod.add_input" class="fn">add_input</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
initial_state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>],
input: &amp;<a class="struct" href="primitives/struct.Absorbing.html" title="struct halo2_gadgets::poseidon::primitives::Absorbing">Absorbing</a>&lt;<a class="enum" href="enum.PaddedWord.html" title="enum halo2_gadgets::poseidon::PaddedWord">PaddedWord</a>&lt;F&gt;, RATE&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Adds the given input to the state.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>], Error&gt;</h4></section></summary><div class="docblock"><p>Adds the given input to the state.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.get_output" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon.rs.html#67">source</a><h4 class="code-header">fn <a href="#tymethod.get_output" class="fn">get_output</a>(state: &amp;[Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">T</a>]) -&gt; <a class="struct" href="primitives/struct.Squeezing.html" title="struct halo2_gadgets::poseidon::primitives::Squeezing">Squeezing</a>&lt;Self::<a class="associatedtype" href="trait.PoseidonInstructions.html#associatedtype.Word" title="type halo2_gadgets::poseidon::PoseidonInstructions::Word">Word</a>, RATE&gt;</h4></section></summary><div class="docblock"><p>Extracts sponge output from the given state.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-PoseidonSpongeInstructions%3CF,+S,+D,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#273-400">source</a><a href="#impl-PoseidonSpongeInstructions%3CF,+S,+D,+WIDTH,+RATE%3E-for-Pow5Chip%3CF,+WIDTH,+RATE%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, S: <a class="trait" href="primitives/trait.Spec.html" title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a>&lt;F, WIDTH, RATE&gt;, D: <a class="trait" href="primitives/trait.Domain.html" title="trait halo2_gadgets::poseidon::primitives::Domain">Domain</a>&lt;F, RATE&gt;, const WIDTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const RATE: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.PoseidonSpongeInstructions.html" title="trait halo2_gadgets::poseidon::PoseidonSpongeInstructions">PoseidonSpongeInstructions</a>&lt;F, S, D, WIDTH, RATE&gt; for <a class="struct" href="struct.Pow5Chip.html" title="struct halo2_gadgets::poseidon::Pow5Chip">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;</h3></section></div><script src="../../implementors/halo2_gadgets/poseidon/trait.PoseidonSpongeInstructions.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -15,21 +15,21 @@
</script>
</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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Sha256</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.digest">digest</a></li><li><a href="#method.finalize">finalize</a></li><li><a href="#method.new">new</a></li><li><a href="#method.update">update</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-Sha256%3CF,+CS%3E">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Sha256%3CF,+CS%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Sha256%3CF,+CS%3E">Send</a></li><li><a href="#impl-Sync-for-Sha256%3CF,+CS%3E">Sync</a></li><li><a href="#impl-Unpin-for-Sha256%3CF,+CS%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Sha256%3CF,+CS%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Sha256%3CF,+CS%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Sha256%3CF,+CS%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Sha256%3CF,+CS%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-Conv-for-Sha256%3CF,+CS%3E">Conv</a></li><li><a href="#impl-FmtForward-for-Sha256%3CF,+CS%3E">FmtForward</a></li><li><a href="#impl-From%3CT%3E-for-Sha256%3CF,+CS%3E">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-Sha256%3CF,+CS%3E">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-Sha256%3CF,+CS%3E">Into&lt;U&gt;</a></li><li><a href="#impl-Pipe-for-Sha256%3CF,+CS%3E">Pipe</a></li><li><a href="#impl-Pointable-for-Sha256%3CF,+CS%3E">Pointable</a></li><li><a href="#impl-Tap-for-Sha256%3CF,+CS%3E">Tap</a></li><li><a href="#impl-TryConv-for-Sha256%3CF,+CS%3E">TryConv</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Sha256%3CF,+CS%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-Sha256%3CF,+CS%3E">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-Sha256%3CF,+CS%3E">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-Sha256%3CF,+CS%3E">WithSubscriber</a></li></ul></section><h2><a href="index.html">In halo2_gadgets::sha256</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">sha256</a>::<wbr><a class="struct" href="#">Sha256</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/sha256.rs.html#66-71">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Sha256&lt;F: Field, CS: <a class="trait" href="trait.Sha256Instructions.html" title="trait halo2_gadgets::sha256::Sha256Instructions">Sha256Instructions</a>&lt;F&gt;&gt; { /* private fields */ }</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>unstable-sha256-gadget</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A gadget that constrains a SHA-256 invocation. It supports input at a granularity of
32 bits.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Sha256%3CF,+Sha256Chip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#73-166">source</a><a href="#impl-Sha256%3CF,+Sha256Chip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, Sha256Chip: <a class="trait" href="trait.Sha256Instructions.html" title="trait halo2_gadgets::sha256::Sha256Instructions">Sha256Instructions</a>&lt;F&gt;&gt; <a class="struct" href="struct.Sha256.html" title="struct halo2_gadgets::sha256::Sha256">Sha256</a>&lt;F, Sha256Chip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#75-83">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(chip: Sha256Chip, layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Create a new hasher instance.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Sha256%3CF,+Sha256Chip%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#73-166">source</a><a href="#impl-Sha256%3CF,+Sha256Chip%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field, Sha256Chip: <a class="trait" href="trait.Sha256Instructions.html" title="trait halo2_gadgets::sha256::Sha256Instructions">Sha256Instructions</a>&lt;F&gt;&gt; <a class="struct" href="struct.Sha256.html" title="struct halo2_gadgets::sha256::Sha256">Sha256</a>&lt;F, Sha256Chip&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#75-83">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(chip: Sha256Chip, layouter: impl Layouter&lt;F&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, Error&gt;</h4></section></summary><div class="docblock"><p>Create a new hasher instance.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.update" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#86-130">source</a><h4 class="code-header">pub fn <a href="#method.update" class="fn">update</a>(
&amp;mut self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: impl Layouter&lt;F&gt;,
data: &amp;[Sha256Chip::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>]
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Digest data, updating the internal state.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Digest data, updating the internal state.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.finalize" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#133-153">source</a><h4 class="code-header">pub fn <a href="#method.finalize" class="fn">finalize</a>(
self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Sha256Digest.html" title="struct halo2_gadgets::sha256::Sha256Digest">Sha256Digest</a>&lt;Sha256Chip::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>&gt;, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Retrieve result and consume hasher instance.</p>
layouter: impl Layouter&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Sha256Digest.html" title="struct halo2_gadgets::sha256::Sha256Digest">Sha256Digest</a>&lt;Sha256Chip::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>&gt;, Error&gt;</h4></section></summary><div class="docblock"><p>Retrieve result and consume hasher instance.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.digest" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#157-165">source</a><h4 class="code-header">pub fn <a href="#method.digest" class="fn">digest</a>(
chip: Sha256Chip,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: impl Layouter&lt;F&gt;,
data: &amp;[Sha256Chip::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>]
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Sha256Digest.html" title="struct halo2_gadgets::sha256::Sha256Digest">Sha256Digest</a>&lt;Sha256Chip::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>&gt;, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Convenience function to compute hash of the data. It will handle hasher creation,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Sha256Digest.html" title="struct halo2_gadgets::sha256::Sha256Digest">Sha256Digest</a>&lt;Sha256Chip::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>&gt;, Error&gt;</h4></section></summary><div class="docblock"><p>Convenience function to compute hash of the data. It will handle hasher creation,
data feeding and finalization.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Debug-for-Sha256%3CF,+CS%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#65">source</a><a href="#impl-Debug-for-Sha256%3CF,+CS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + Field, CS: <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="trait.Sha256Instructions.html" title="trait halo2_gadgets::sha256::Sha256Instructions">Sha256Instructions</a>&lt;F&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Sha256.html" title="struct halo2_gadgets::sha256::Sha256">Sha256</a>&lt;F, CS&gt;<span class="where fmt-newline">where
CS::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,

File diff suppressed because one or more lines are too long

View File

@ -13,54 +13,54 @@
});
});
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Sha256Instructions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.BlockWord">BlockWord</a></li><li><a href="#associatedtype.State">State</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.compress">compress</a></li><li><a href="#tymethod.digest">digest</a></li><li><a href="#tymethod.initialization">initialization</a></li><li><a href="#tymethod.initialization_vector">initialization_vector</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::sha256</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">sha256</a>::<wbr><a class="trait" href="#">Sha256Instructions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/sha256.rs.html#25-57">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Sha256Instructions&lt;F: Field&gt;: <a class="trait" href="../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;F&gt; {
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Sha256Instructions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.BlockWord">BlockWord</a></li><li><a href="#associatedtype.State">State</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.compress">compress</a></li><li><a href="#tymethod.digest">digest</a></li><li><a href="#tymethod.initialization">initialization</a></li><li><a href="#tymethod.initialization_vector">initialization_vector</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::sha256</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">sha256</a>::<wbr><a class="trait" href="#">Sha256Instructions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/sha256.rs.html#25-57">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Sha256Instructions&lt;F: Field&gt;: Chip&lt;F&gt; {
type <a href="#associatedtype.State" class="associatedtype">State</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>;
type <a href="#associatedtype.BlockWord" class="associatedtype">BlockWord</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>;
// Required methods
fn <a href="#tymethod.initialization_vector" class="fn">initialization_vector</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
layouter: &amp;mut impl Layouter&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.initialization" class="fn">initialization</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
init_state: &amp;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.compress" class="fn">compress</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
initialized_state: &amp;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>,
input: [Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">16</a>]
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, Error&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.digest" class="fn">digest</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
state: &amp;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">8</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">8</a>], Error&gt;;
}</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>unstable-sha256-gadget</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The set of circuit instructions required to use the <a href="struct.Sha256.html" title="struct halo2_gadgets::sha256::Sha256"><code>Sha256</code></a> gadget.</p>
</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.State" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#27">source</a><h4 class="code-header">type <a href="#associatedtype.State" class="associatedtype">State</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a></h4></section></summary><div class="docblock"><p>Variable representing the SHA-256 internal state.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.BlockWord" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#30">source</a><h4 class="code-header">type <a href="#associatedtype.BlockWord" class="associatedtype">BlockWord</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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a></h4></section></summary><div class="docblock"><p>Variable representing a 32-bit word of the input block to the SHA-256 compression
function.</p>
</div></details></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.initialization_vector" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#33">source</a><h4 class="code-header">fn <a href="#tymethod.initialization_vector" class="fn">initialization_vector</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Places the SHA-256 IV in the circuit, returning the initial state variable.</p>
layouter: &amp;mut impl Layouter&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Places the SHA-256 IV in the circuit, returning the initial state variable.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.initialization" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#36-40">source</a><h4 class="code-header">fn <a href="#tymethod.initialization" class="fn">initialization</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
init_state: &amp;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Creates an initial state from the output state of a previous block</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Creates an initial state from the output state of a previous block</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.compress" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#44-49">source</a><h4 class="code-header">fn <a href="#tymethod.compress" class="fn">compress</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
initialized_state: &amp;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>,
input: [Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">16</a>]
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Starting from the given initialized state, processes a block of input and returns the
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Starting from the given initialized state, processes a block of input and returns the
final state.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.digest" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256.rs.html#52-56">source</a><h4 class="code-header">fn <a href="#tymethod.digest" class="fn">digest</a>(
&amp;self,
layouter: &amp;mut impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
layouter: &amp;mut impl Layouter&lt;F&gt;,
state: &amp;Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.State" title="type halo2_gadgets::sha256::Sha256Instructions::State">State</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">8</a>], <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Converts the given state into a message digest.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;[Self::<a class="associatedtype" href="trait.Sha256Instructions.html#associatedtype.BlockWord" title="type halo2_gadgets::sha256::Sha256Instructions::BlockWord">BlockWord</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">8</a>], Error&gt;</h4></section></summary><div class="docblock"><p>Converts the given state into a message digest.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-Sha256Instructions%3CFp%3E-for-Table16Chip" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sha256/table16.rs.html#329-374">source</a><a href="#impl-Sha256Instructions%3CFp%3E-for-Table16Chip" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Sha256Instructions.html" title="trait halo2_gadgets::sha256::Sha256Instructions">Sha256Instructions</a>&lt;Fp&gt; for <a class="struct" href="struct.Table16Chip.html" title="struct halo2_gadgets::sha256::Table16Chip">Table16Chip</a></h3></section></summary><div class="impl-items"><section id="associatedtype.State-1" class="associatedtype trait-impl"><a href="#associatedtype.State-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.State" class="associatedtype">State</a> = State</h4></section><section id="associatedtype.BlockWord-1" class="associatedtype trait-impl"><a href="#associatedtype.BlockWord-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.BlockWord" class="associatedtype">BlockWord</a> = <a class="struct" href="struct.BlockWord.html" title="struct halo2_gadgets::sha256::BlockWord">BlockWord</a></h4></section></div></details></div><script src="../../implementors/halo2_gadgets/sha256/trait.Sha256Instructions.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

View File

@ -21,27 +21,27 @@
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-SinsemillaChip%3CHash,+Commit,+F%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#126-264">source</a><a href="#impl-SinsemillaChip%3CHash,+Commit,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, F&gt; <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, F&gt;<span class="where fmt-newline">where
Hash: <a class="trait" href="../trait.HashDomains.html" title="trait halo2_gadgets::sinsemilla::HashDomains">HashDomains</a>&lt;Affine&gt;,
F: <a class="trait" href="../../ecc/trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;,
Commit: <a class="trait" href="../trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, F, Hash&gt;,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.construct" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#133-135">source</a><h4 class="code-header">pub fn <a href="#method.construct" class="fn">construct</a>(config: &lt;Self as <a class="trait" href="../../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;Base&gt;&gt;::<a class="associatedtype" href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Config" title="type halo2_proofs::circuit::Chip::Config">Config</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Reconstructs this chip from the given config.</p>
Commit: <a class="trait" href="../trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, F, Hash&gt;,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.construct" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#133-135">source</a><h4 class="code-header">pub fn <a href="#method.construct" class="fn">construct</a>(config: &lt;Self as Chip&lt;Base&gt;&gt;::Config) -&gt; Self</h4></section></summary><div class="docblock"><p>Reconstructs this chip from the given config.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.load" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#138-144">source</a><h4 class="code-header">pub fn <a href="#method.load" class="fn">load</a>(
config: <a class="struct" href="struct.SinsemillaConfig.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaConfig">SinsemillaConfig</a>&lt;Hash, Commit, F&gt;,
layouter: &amp;mut impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;Base&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;&lt;Self as <a class="trait" href="../../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;Base&gt;&gt;::<a class="associatedtype" href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Loaded" title="type halo2_proofs::circuit::Chip::Loaded">Loaded</a>, <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Loads the lookup table required by this chip into the circuit.</p>
layouter: &amp;mut impl Layouter&lt;Base&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;&lt;Self as Chip&lt;Base&gt;&gt;::Loaded, Error&gt;</h4></section></summary><div class="docblock"><p>Loads the lookup table required by this chip into the circuit.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.configure" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#151-263">source</a><h4 class="code-header">pub fn <a href="#method.configure" class="fn">configure</a>(
meta: &amp;mut <a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.ConstraintSystem.html" title="struct halo2_proofs::plonk::circuit::ConstraintSystem">ConstraintSystem</a>&lt;Base&gt;,
advices: [<a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Advice.html" title="struct halo2_proofs::plonk::circuit::Advice">Advice</a>&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">5</a>],
witness_pieces: <a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Advice.html" title="struct halo2_proofs::plonk::circuit::Advice">Advice</a>&gt;,
fixed_y_q: <a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Fixed.html" title="struct halo2_proofs::plonk::circuit::Fixed">Fixed</a>&gt;,
lookup: (<a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.TableColumn.html" title="struct halo2_proofs::plonk::circuit::TableColumn">TableColumn</a>, <a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.TableColumn.html" title="struct halo2_proofs::plonk::circuit::TableColumn">TableColumn</a>, <a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.TableColumn.html" title="struct halo2_proofs::plonk::circuit::TableColumn">TableColumn</a>),
meta: &amp;mut ConstraintSystem&lt;Base&gt;,
advices: [Column&lt;Advice&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">5</a>],
witness_pieces: Column&lt;Advice&gt;,
fixed_y_q: Column&lt;Fixed&gt;,
lookup: (TableColumn, TableColumn, TableColumn),
range_check: <a class="struct" href="../../utilities/lookup_range_check/struct.LookupRangeCheckConfig.html" title="struct halo2_gadgets::utilities::lookup_range_check::LookupRangeCheckConfig">LookupRangeCheckConfig</a>&lt;Base, { sinsemilla::K }&gt;
) -&gt; &lt;Self as <a class="trait" href="../../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;Base&gt;&gt;::<a class="associatedtype" href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Config" title="type halo2_proofs::circuit::Chip::Config">Config</a></h4></section></summary><div class="docblock"><h5 id="side-effects"><a href="#side-effects">Side-effects</a></h5>
) -&gt; &lt;Self as Chip&lt;Base&gt;&gt;::Config</h4></section></summary><div class="docblock"><h5 id="side-effects"><a href="#side-effects">Side-effects</a></h5>
<p>All columns in <code>advices</code> and will be equality-enabled.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Chip%3CFp%3E-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#108-124">source</a><a href="#impl-Chip%3CFp%3E-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, Fixed&gt; <a class="trait" href="../../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;Fp&gt; for <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;<span class="where fmt-newline">where
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Chip%3CFp%3E-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#108-124">source</a><a href="#impl-Chip%3CFp%3E-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, Fixed&gt; Chip&lt;Fp&gt; for <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;<span class="where fmt-newline">where
Hash: <a class="trait" href="../trait.HashDomains.html" title="trait halo2_gadgets::sinsemilla::HashDomains">HashDomains</a>&lt;Affine&gt;,
Fixed: <a class="trait" href="../../ecc/trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;,
Commit: <a class="trait" href="../trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, Fixed, Hash&gt;,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Config" class="associatedtype trait-impl"><a href="#associatedtype.Config" class="anchor">§</a><h4 class="code-header">type <a href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Config" class="associatedtype">Config</a> = <a class="struct" href="struct.SinsemillaConfig.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaConfig">SinsemillaConfig</a>&lt;Hash, Commit, Fixed&gt;</h4></section></summary><div class='docblock'>A type that holds the configuration for this chip, and any other state it may need
during circuit synthesis, that can be derived during <a href="../../../halo2_proofs/plonk/circuit/trait.Circuit.html#tymethod.configure" title="associated function halo2_proofs::plonk::circuit::Circuit::configure"><code>Circuit::configure</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.Loaded" class="associatedtype trait-impl"><a href="#associatedtype.Loaded" class="anchor">§</a><h4 class="code-header">type <a href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Loaded" class="associatedtype">Loaded</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section></summary><div class='docblock'>A type that holds any general chip state that needs to be loaded at the start of
<a href="../../../halo2_proofs/plonk/circuit/trait.Circuit.html#tymethod.synthesize" title="method halo2_proofs::plonk::circuit::Circuit::synthesize"><code>Circuit::synthesize</code></a>. This might simply be <code>()</code> for some chips.</div></details><details class="toggle method-toggle" open><summary><section id="method.config" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#117-119">source</a><a href="#method.config" class="anchor">§</a><h4 class="code-header">fn <a href="../../../halo2_proofs/circuit/trait.Chip.html#tymethod.config" class="fn">config</a>(&amp;self) -&gt; &amp;Self::<a class="associatedtype" href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Config" title="type halo2_proofs::circuit::Chip::Config">Config</a></h4></section></summary><div class='docblock'>The chip holds its own configuration.</div></details><details class="toggle method-toggle" open><summary><section id="method.loaded" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#121-123">source</a><a href="#method.loaded" class="anchor">§</a><h4 class="code-header">fn <a href="../../../halo2_proofs/circuit/trait.Chip.html#tymethod.loaded" class="fn">loaded</a>(&amp;self) -&gt; &amp;Self::<a class="associatedtype" href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Loaded" title="type halo2_proofs::circuit::Chip::Loaded">Loaded</a></h4></section></summary><div class='docblock'>Provides access to general chip state loaded at the beginning of circuit
synthesis. <a href="../../../halo2_proofs/circuit/trait.Chip.html#tymethod.loaded">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#98">source</a><a href="#impl-Clone-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, Fixed&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;<span class="where fmt-newline">where
Commit: <a class="trait" href="../trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, Fixed, Hash&gt;,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Config" class="associatedtype trait-impl"><a href="#associatedtype.Config" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Config</a> = <a class="struct" href="struct.SinsemillaConfig.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaConfig">SinsemillaConfig</a>&lt;Hash, Commit, Fixed&gt;</h4></section></summary><div class='docblock'>A type that holds the configuration for this chip, and any other state it may need
during circuit synthesis, that can be derived during <a href="crate::plonk::Circuit::configure"><code>Circuit::configure</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.Loaded" class="associatedtype trait-impl"><a href="#associatedtype.Loaded" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Loaded</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section></summary><div class='docblock'>A type that holds any general chip state that needs to be loaded at the start of
<a href="crate::plonk::Circuit::synthesize"><code>Circuit::synthesize</code></a>. This might simply be <code>()</code> for some chips.</div></details><details class="toggle method-toggle" open><summary><section id="method.config" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#117-119">source</a><a href="#method.config" class="anchor">§</a><h4 class="code-header">fn <a class="fn">config</a>(&amp;self) -&gt; &amp;Self::Config</h4></section></summary><div class='docblock'>The chip holds its own configuration.</div></details><details class="toggle method-toggle" open><summary><section id="method.loaded" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#121-123">source</a><a href="#method.loaded" class="anchor">§</a><h4 class="code-header">fn <a class="fn">loaded</a>(&amp;self) -&gt; &amp;Self::Loaded</h4></section></summary><div class='docblock'>Provides access to general chip state loaded at the beginning of circuit
synthesis. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#98">source</a><a href="#impl-Clone-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, Fixed&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;<span class="where fmt-newline">where
Hash: <a class="trait" href="../trait.HashDomains.html" title="trait halo2_gadgets::sinsemilla::HashDomains">HashDomains</a>&lt;Affine&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,
Fixed: <a class="trait" href="../../ecc/trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,
Commit: <a class="trait" href="../trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, Fixed, Hash&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#98">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#98">source</a><a href="#impl-Debug-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, Fixed&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;<span class="where fmt-newline">where
@ -55,23 +55,23 @@ by <code>==</code>.</div></details><details class="toggle method-toggle" open><s
sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-SinsemillaInstructions%3CEpAffine,+%7B+sinsemilla::K+%7D,+%7B+sinsemilla::C+%7D%3E-for-SinsemillaChip%3CHash,+Commit,+F%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#267-327">source</a><a href="#impl-SinsemillaInstructions%3CEpAffine,+%7B+sinsemilla::K+%7D,+%7B+sinsemilla::C+%7D%3E-for-SinsemillaChip%3CHash,+Commit,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, F&gt; <a class="trait" href="../trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;EpAffine, { sinsemilla::K }, { sinsemilla::C }&gt; for <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, F&gt;<span class="where fmt-newline">where
Hash: <a class="trait" href="../trait.HashDomains.html" title="trait halo2_gadgets::sinsemilla::HashDomains">HashDomains</a>&lt;Affine&gt;,
F: <a class="trait" href="../../ecc/trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;,
Commit: <a class="trait" href="../trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, F, Hash&gt;,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.CellValue" class="associatedtype trait-impl"><a href="#associatedtype.CellValue" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.CellValue" class="associatedtype">CellValue</a> = <a class="struct" href="../../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;Fp, Fp&gt;</h4></section></summary><div class='docblock'>A variable in the circuit.</div></details><details class="toggle" open><summary><section id="associatedtype.Message" class="associatedtype trait-impl"><a href="#associatedtype.Message" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.Message" class="associatedtype">Message</a> = Message&lt;Fp, { sinsemilla::K }, { sinsemilla::C }&gt;</h4></section></summary><div class='docblock'>A message composed of <a href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece"><code>Self::MessagePiece</code></a>s.</div></details><details class="toggle" open><summary><section id="associatedtype.MessagePiece" class="associatedtype trait-impl"><a href="#associatedtype.MessagePiece" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece" class="associatedtype">MessagePiece</a> = MessagePiece&lt;Fp, { sinsemilla::K }&gt;</h4></section></summary><div class='docblock'>A piece in a message containing a number of <code>K</code>-bit words.
Commit: <a class="trait" href="../trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, F, Hash&gt;,</span></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.CellValue" class="associatedtype trait-impl"><a href="#associatedtype.CellValue" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.CellValue" class="associatedtype">CellValue</a> = AssignedCell&lt;Fp, Fp&gt;</h4></section></summary><div class='docblock'>A variable in the circuit.</div></details><details class="toggle" open><summary><section id="associatedtype.Message" class="associatedtype trait-impl"><a href="#associatedtype.Message" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.Message" class="associatedtype">Message</a> = Message&lt;Fp, { sinsemilla::K }, { sinsemilla::C }&gt;</h4></section></summary><div class='docblock'>A message composed of <a href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece"><code>Self::MessagePiece</code></a>s.</div></details><details class="toggle" open><summary><section id="associatedtype.MessagePiece" class="associatedtype trait-impl"><a href="#associatedtype.MessagePiece" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece" class="associatedtype">MessagePiece</a> = MessagePiece&lt;Fp, { sinsemilla::K }&gt;</h4></section></summary><div class='docblock'>A piece in a message containing a number of <code>K</code>-bit words.
A <a href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece"><code>Self::MessagePiece</code></a> fits in a single base field element,
which means it can only contain up to <code>N</code> words, where
<code>N*K &lt;= C::Base::CAPACITY</code>. <a href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece">Read more</a></div></details><details class="toggle" open><summary><section id="associatedtype.RunningSum" class="associatedtype trait-impl"><a href="#associatedtype.RunningSum" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.RunningSum" class="associatedtype">RunningSum</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;&lt;<a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, F&gt; as <a class="trait" href="../trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;EpAffine, { sinsemilla::K }, { sinsemilla::C }&gt;&gt;::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.CellValue" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::CellValue">CellValue</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4></section></summary><div class='docblock'>A cumulative sum <code>z</code> is used to decompose a Sinsemilla message. It
produces intermediate values for each word in the message, such
that <code>z_next</code> = (<code>z_cur</code> - <code>word_next</code>) / <code>2^K</code>. <a href="../trait.SinsemillaInstructions.html#associatedtype.RunningSum">Read more</a></div></details><details class="toggle" open><summary><section id="associatedtype.X" class="associatedtype trait-impl"><a href="#associatedtype.X" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.X" class="associatedtype">X</a> = <a class="struct" href="../../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;Fp, Fp&gt;</h4></section></summary><div class='docblock'>The x-coordinate of a point output of <a href="../trait.SinsemillaInstructions.html#tymethod.hash_to_point"><code>Self::hash_to_point</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.NonIdentityPoint" class="associatedtype trait-impl"><a href="#associatedtype.NonIdentityPoint" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.NonIdentityPoint" class="associatedtype">NonIdentityPoint</a> = <a class="struct" href="../../ecc/chip/struct.NonIdentityEccPoint.html" title="struct halo2_gadgets::ecc::chip::NonIdentityEccPoint">NonIdentityEccPoint</a></h4></section></summary><div class='docblock'>A point output of <a href="../trait.SinsemillaInstructions.html#tymethod.hash_to_point"><code>Self::hash_to_point</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.FixedPoints" class="associatedtype trait-impl"><a href="#associatedtype.FixedPoints" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.FixedPoints" class="associatedtype">FixedPoints</a> = F</h4></section></summary><div class='docblock'>A type enumerating the fixed points used in <code>CommitDomains</code>.</div></details><details class="toggle" open><summary><section id="associatedtype.HashDomains" class="associatedtype trait-impl"><a href="#associatedtype.HashDomains" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.HashDomains" class="associatedtype">HashDomains</a> = Hash</h4></section></summary><div class='docblock'>HashDomains used in this instruction.</div></details><details class="toggle" open><summary><section id="associatedtype.CommitDomains" class="associatedtype trait-impl"><a href="#associatedtype.CommitDomains" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.CommitDomains" class="associatedtype">CommitDomains</a> = Commit</h4></section></summary><div class='docblock'>CommitDomains used in this instruction.</div></details><details class="toggle method-toggle" open><summary><section id="method.witness_message_piece" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#288-308">source</a><a href="#method.witness_message_piece" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.SinsemillaInstructions.html#tymethod.witness_message_piece" class="fn">witness_message_piece</a>(
that <code>z_next</code> = (<code>z_cur</code> - <code>word_next</code>) / <code>2^K</code>. <a href="../trait.SinsemillaInstructions.html#associatedtype.RunningSum">Read more</a></div></details><details class="toggle" open><summary><section id="associatedtype.X" class="associatedtype trait-impl"><a href="#associatedtype.X" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.X" class="associatedtype">X</a> = AssignedCell&lt;Fp, Fp&gt;</h4></section></summary><div class='docblock'>The x-coordinate of a point output of <a href="../trait.SinsemillaInstructions.html#tymethod.hash_to_point"><code>Self::hash_to_point</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.NonIdentityPoint" class="associatedtype trait-impl"><a href="#associatedtype.NonIdentityPoint" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.NonIdentityPoint" class="associatedtype">NonIdentityPoint</a> = <a class="struct" href="../../ecc/chip/struct.NonIdentityEccPoint.html" title="struct halo2_gadgets::ecc::chip::NonIdentityEccPoint">NonIdentityEccPoint</a></h4></section></summary><div class='docblock'>A point output of <a href="../trait.SinsemillaInstructions.html#tymethod.hash_to_point"><code>Self::hash_to_point</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.FixedPoints" class="associatedtype trait-impl"><a href="#associatedtype.FixedPoints" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.FixedPoints" class="associatedtype">FixedPoints</a> = F</h4></section></summary><div class='docblock'>A type enumerating the fixed points used in <code>CommitDomains</code>.</div></details><details class="toggle" open><summary><section id="associatedtype.HashDomains" class="associatedtype trait-impl"><a href="#associatedtype.HashDomains" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.HashDomains" class="associatedtype">HashDomains</a> = Hash</h4></section></summary><div class='docblock'>HashDomains used in this instruction.</div></details><details class="toggle" open><summary><section id="associatedtype.CommitDomains" class="associatedtype trait-impl"><a href="#associatedtype.CommitDomains" class="anchor">§</a><h4 class="code-header">type <a href="../trait.SinsemillaInstructions.html#associatedtype.CommitDomains" class="associatedtype">CommitDomains</a> = Commit</h4></section></summary><div class='docblock'>CommitDomains used in this instruction.</div></details><details class="toggle method-toggle" open><summary><section id="method.witness_message_piece" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#288-308">source</a><a href="#method.witness_message_piece" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.SinsemillaInstructions.html#tymethod.witness_message_piece" class="fn">witness_message_piece</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;Base&gt;,
field_elem: <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;Base&gt;,
layouter: impl Layouter&lt;Base&gt;,
field_elem: Value&lt;Base&gt;,
num_words: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::MessagePiece">MessagePiece</a>, <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Witness a message piece given a field element. Returns a <a href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece"><code>Self::MessagePiece</code></a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::MessagePiece">MessagePiece</a>, Error&gt;</h4></section></summary><div class='docblock'>Witness a message piece given a field element. Returns a <a href="../trait.SinsemillaInstructions.html#associatedtype.MessagePiece"><code>Self::MessagePiece</code></a>
encoding the given message. <a href="../trait.SinsemillaInstructions.html#tymethod.witness_message_piece">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_to_point" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#312-322">source</a><a href="#method.hash_to_point" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.SinsemillaInstructions.html#tymethod.hash_to_point" class="fn">hash_to_point</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;Base&gt;,
layouter: impl Layouter&lt;Base&gt;,
Q: Affine,
message: Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.Message" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::Message">Message</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::NonIdentityPoint">NonIdentityPoint</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Hashes a message to an ECC curve point.
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::NonIdentityPoint">NonIdentityPoint</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), Error&gt;</h4></section></summary><div class='docblock'>Hashes a message to an ECC curve point.
This returns both the resulting point, as well as the message
decomposition in the form of intermediate values in a cumulative
sum.</div></details><details class="toggle method-toggle" open><summary><section id="method.extract" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#324-326">source</a><a href="#method.extract" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.SinsemillaInstructions.html#tymethod.extract" class="fn">extract</a>(point: &amp;Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::NonIdentityPoint">NonIdentityPoint</a>) -&gt; Self::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.X" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::X">X</a></h4></section></summary><div class='docblock'>Extracts the x-coordinate of the output of a Sinsemilla hash.</div></details></div></details><section id="impl-Eq-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/chip.rs.html#98">source</a><a href="#impl-Eq-for-SinsemillaChip%3CHash,+Commit,+Fixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, Fixed&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.SinsemillaChip.html" title="struct halo2_gadgets::sinsemilla::chip::SinsemillaChip">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;<span class="where fmt-newline">where

File diff suppressed because one or more lines are too long

View File

@ -20,8 +20,8 @@ specific position.</p>
MerkleChip: <a class="trait" href="trait.MerkleInstructions.html" title="trait halo2_gadgets::sinsemilla::merkle::MerkleInstructions">MerkleInstructions</a>&lt;C, PATH_LENGTH, K, MAX_WORDS&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.construct" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/merkle.rs.html#84-97">source</a><h4 class="code-header">pub fn <a href="#method.construct" class="fn">construct</a>(
chips: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[MerkleChip; PAR]</a>,
domain: MerkleChip::<a class="associatedtype" href="../trait.SinsemillaInstructions.html#associatedtype.HashDomains" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::HashDomains">HashDomains</a>,
leaf_pos: <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
path: <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;[C::Base; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">PATH_LENGTH</a>]&gt;
leaf_pos: Value&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
path: Value&lt;[C::Base; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">PATH_LENGTH</a>]&gt;
) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a <a href="struct.MerklePath.html" title="struct halo2_gadgets::sinsemilla::merkle::MerklePath"><code>MerklePath</code></a>.</p>
<p>A circuit may have many more columns available than are required by a single
<code>MerkleChip</code>. To make better use of the available circuit area, the <code>MerklePath</code>
@ -31,9 +31,9 @@ processing fewer layers if the division is inexact).</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-MerklePath%3CC,+MerkleChip,+PATH_LENGTH,+K,+MAX_WORDS,+PAR%3E-1" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/merkle.rs.html#101-171">source</a><a href="#impl-MerklePath%3CC,+MerkleChip,+PATH_LENGTH,+K,+MAX_WORDS,+PAR%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, MerkleChip, const PATH_LENGTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const PAR: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="struct" href="struct.MerklePath.html" title="struct halo2_gadgets::sinsemilla::merkle::MerklePath">MerklePath</a>&lt;C, MerkleChip, PATH_LENGTH, K, MAX_WORDS, PAR&gt;<span class="where fmt-newline">where
MerkleChip: <a class="trait" href="trait.MerkleInstructions.html" title="trait halo2_gadgets::sinsemilla::merkle::MerkleInstructions">MerkleInstructions</a>&lt;C, PATH_LENGTH, K, MAX_WORDS&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.calculate_root" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/merkle.rs.html#117-170">source</a><h4 class="code-header">pub fn <a href="#method.calculate_root" class="fn">calculate_root</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
leaf: MerkleChip::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;MerkleChip::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Calculates the root of the tree containing the given leaf at this Merkle path.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;MerkleChip::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Calculates the root of the tree containing the given leaf at this Merkle path.</p>
<p>Implements <a href="https://zips.z.cash/protocol/protocol.pdf#merklepath">Zcash Protocol Specification Section 4.9: Merkle Path Validity</a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Clone-for-MerklePath%3CC,+MerkleChip,+PATH_LENGTH,+K,+MAX_WORDS,+PAR%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/merkle.rs.html#48">source</a><a href="#impl-Clone-for-MerklePath%3CC,+MerkleChip,+PATH_LENGTH,+K,+MAX_WORDS,+PAR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + CurveAffine, MerkleChip, const PATH_LENGTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const PAR: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.MerklePath.html" title="struct halo2_gadgets::sinsemilla::merkle::MerklePath">MerklePath</a>&lt;C, MerkleChip, PATH_LENGTH, K, MAX_WORDS, PAR&gt;<span class="where fmt-newline">where
MerkleChip: <a class="trait" href="trait.MerkleInstructions.html" title="trait halo2_gadgets::sinsemilla::merkle::MerkleInstructions">MerkleInstructions</a>&lt;C, PATH_LENGTH, K, MAX_WORDS&gt; + <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/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,

View File

@ -13,27 +13,27 @@
});
});
</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="logo-container" href="../../../halo2_gadgets/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../halo2_gadgets/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">MerkleInstructions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.hash_layer">hash_layer</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::sinsemilla::merkle</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">halo2_gadgets</a>::<wbr><a href="../index.html">sinsemilla</a>::<wbr><a href="index.html">merkle</a>::<wbr><a class="trait" href="#">MerkleInstructions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/halo2_gadgets/sinsemilla/merkle.rs.html#21-44">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait MerkleInstructions&lt;C: CurveAffine, const PATH_LENGTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;: <a class="trait" href="../trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt; + <a class="trait" href="../../utilities/cond_swap/trait.CondSwapInstructions.html" title="trait halo2_gadgets::utilities::cond_swap::CondSwapInstructions">CondSwapInstructions</a>&lt;C::Base&gt; + <a class="trait" href="../../utilities/trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;C::Base&gt; + <a class="trait" href="../../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;C::Base&gt; {
</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="logo-container" href="../../../halo2_gadgets/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../halo2_gadgets/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">MerkleInstructions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.hash_layer">hash_layer</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::sinsemilla::merkle</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">halo2_gadgets</a>::<wbr><a href="../index.html">sinsemilla</a>::<wbr><a href="index.html">merkle</a>::<wbr><a class="trait" href="#">MerkleInstructions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/halo2_gadgets/sinsemilla/merkle.rs.html#21-44">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait MerkleInstructions&lt;C: CurveAffine, const PATH_LENGTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;: <a class="trait" href="../trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt; + <a class="trait" href="../../utilities/cond_swap/trait.CondSwapInstructions.html" title="trait halo2_gadgets::utilities::cond_swap::CondSwapInstructions">CondSwapInstructions</a>&lt;C::Base&gt; + <a class="trait" href="../../utilities/trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;C::Base&gt; + Chip&lt;C::Base&gt; {
// Required method
fn <a href="#tymethod.hash_layer" class="fn">hash_layer</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
Q: C,
l: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
left: Self::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>,
right: Self::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Error&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Instructions to check the validity of a Merkle path of a given <code>PATH_LENGTH</code>.
The hash function used is a Sinsemilla instance with <code>K</code>-bit words.
The hash function can process <code>MAX_WORDS</code> words.</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="toggle method-toggle" open><summary><section id="tymethod.hash_layer" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/merkle.rs.html#36-43">source</a><h4 class="code-header">fn <a href="#tymethod.hash_layer" class="fn">hash_layer</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
Q: C,
l: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
left: Self::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>,
right: Self::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Compute MerkleCRH for a given <code>layer</code>. The hash that computes the root
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../utilities/trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Compute MerkleCRH for a given <code>layer</code>. The hash that computes the root
is at layer 0, and the hashes that are applied to two leaves are at
layer <code>MERKLE_DEPTH - 1</code> = layer 31.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-MerkleInstructions%3CEpAffine,+MERKLE_DEPTH,+%7B+sinsemilla::K+%7D,+%7B+sinsemilla::C+%7D%3E-for-MerkleChip%3CHash,+Commit,+F%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/sinsemilla/merkle/chip.rs.html#199-416">source</a><a href="#impl-MerkleInstructions%3CEpAffine,+MERKLE_DEPTH,+%7B+sinsemilla::K+%7D,+%7B+sinsemilla::C+%7D%3E-for-MerkleChip%3CHash,+Commit,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, F, const MERKLE_DEPTH: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.MerkleInstructions.html" title="trait halo2_gadgets::sinsemilla::merkle::MerkleInstructions">MerkleInstructions</a>&lt;EpAffine, MERKLE_DEPTH, { sinsemilla::K }, { sinsemilla::C }&gt; for <a class="struct" href="chip/struct.MerkleChip.html" title="struct halo2_gadgets::sinsemilla::merkle::chip::MerkleChip">MerkleChip</a>&lt;Hash, Commit, F&gt;<span class="where fmt-newline">where

View File

@ -26,16 +26,16 @@ $\mathsf{SinsemillaShortCommit}$ can be used.</p>
) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a new <code>CommitDomain</code> for the given domain.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.commit" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#419-436">source</a><h4 class="code-header">pub fn <a href="#method.commit" class="fn">commit</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
message: <a class="struct" href="struct.Message.html" title="struct halo2_gadgets::sinsemilla::Message">Message</a>&lt;C, SinsemillaChip, K, MAX_WORDS&gt;,
r: <a class="struct" href="../ecc/struct.ScalarFixed.html" title="struct halo2_gadgets::ecc::ScalarFixed">ScalarFixed</a>&lt;C, EccChip&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../ecc/struct.Point.html" title="struct halo2_gadgets::ecc::Point">Point</a>&lt;C, EccChip&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;SinsemillaChip::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>$\mathsf{SinsemillaCommit}$ from <a href="https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit">§ 5.4.8.4</a>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../ecc/struct.Point.html" title="struct halo2_gadgets::ecc::Point">Point</a>&lt;C, EccChip&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;SinsemillaChip::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), Error&gt;</h4></section></summary><div class="docblock"><p>$\mathsf{SinsemillaCommit}$ from <a href="https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit">§ 5.4.8.4</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.short_commit" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#442-451">source</a><h4 class="code-header">pub fn <a href="#method.short_commit" class="fn">short_commit</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
message: <a class="struct" href="struct.Message.html" title="struct halo2_gadgets::sinsemilla::Message">Message</a>&lt;C, SinsemillaChip, K, MAX_WORDS&gt;,
r: <a class="struct" href="../ecc/struct.ScalarFixed.html" title="struct halo2_gadgets::ecc::ScalarFixed">ScalarFixed</a>&lt;C, EccChip&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../ecc/struct.X.html" title="struct halo2_gadgets::ecc::X">X</a>&lt;C, EccChip&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;SinsemillaChip::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>$\mathsf{SinsemillaShortCommit}$ from <a href="https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit">§ 5.4.8.4</a>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../ecc/struct.X.html" title="struct halo2_gadgets::ecc::X">X</a>&lt;C, EccChip&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;SinsemillaChip::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), Error&gt;</h4></section></summary><div class="docblock"><p>$\mathsf{SinsemillaShortCommit}$ from <a href="https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit">§ 5.4.8.4</a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Debug-for-CommitDomain%3CC,+SinsemillaChip,+EccChip,+K,+MAX_WORDS%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#368">source</a><a href="#impl-Debug-for-CommitDomain%3CC,+SinsemillaChip,+EccChip,+K,+MAX_WORDS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + CurveAffine, SinsemillaChip, EccChip, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.CommitDomain.html" title="struct halo2_gadgets::sinsemilla::CommitDomain">CommitDomain</a>&lt;C, SinsemillaChip, EccChip, K, MAX_WORDS&gt;<span class="where fmt-newline">where
SinsemillaChip: <a class="trait" href="trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt; + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,
EccChip: <a class="trait" href="../ecc/trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C, NonIdentityPoint = &lt;SinsemillaChip as <a class="trait" href="trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt;&gt;::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::NonIdentityPoint">NonIdentityPoint</a>, FixedPoints = &lt;SinsemillaChip as <a class="trait" href="trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt;&gt;::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::FixedPoints">FixedPoints</a>&gt; + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#368">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CommitDomain%3CC,+SinsemillaChip,+EccChip,+K,+MAX_WORDS%3E" class="impl"><a href="#impl-RefUnwindSafe-for-CommitDomain%3CC,+SinsemillaChip,+EccChip,+K,+MAX_WORDS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C, SinsemillaChip, EccChip, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.CommitDomain.html" title="struct halo2_gadgets::sinsemilla::CommitDomain">CommitDomain</a>&lt;C, SinsemillaChip, EccChip, K, MAX_WORDS&gt;<span class="where fmt-newline">where

View File

@ -26,14 +26,14 @@ be used.</p>
) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a new <code>HashDomain</code> for the given domain.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.hash_to_point" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#321-330">source</a><h4 class="code-header">pub fn <a href="#method.hash_to_point" class="fn">hash_to_point</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
message: <a class="struct" href="struct.Message.html" title="struct halo2_gadgets::sinsemilla::Message">Message</a>&lt;C, SinsemillaChip, K, MAX_WORDS&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../ecc/struct.NonIdentityPoint.html" title="struct halo2_gadgets::ecc::NonIdentityPoint">NonIdentityPoint</a>&lt;C, EccChip&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;SinsemillaChip::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>$\mathsf{SinsemillaHashToPoint}$ from <a href="https://zips.z.cash/protocol/protocol.pdf#concretesinsemillahash">§ 5.4.1.9</a>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../ecc/struct.NonIdentityPoint.html" title="struct halo2_gadgets::ecc::NonIdentityPoint">NonIdentityPoint</a>&lt;C, EccChip&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;SinsemillaChip::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), Error&gt;</h4></section></summary><div class="docblock"><p>$\mathsf{SinsemillaHashToPoint}$ from <a href="https://zips.z.cash/protocol/protocol.pdf#concretesinsemillahash">§ 5.4.1.9</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.hash" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#336-344">source</a><h4 class="code-header">pub fn <a href="#method.hash" class="fn">hash</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
message: <a class="struct" href="struct.Message.html" title="struct halo2_gadgets::sinsemilla::Message">Message</a>&lt;C, SinsemillaChip, K, MAX_WORDS&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../ecc/struct.X.html" title="struct halo2_gadgets::ecc::X">X</a>&lt;C, EccChip&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;SinsemillaChip::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>$\mathsf{SinsemillaHash}$ from <a href="https://zips.z.cash/protocol/protocol.pdf#concretesinsemillahash">§ 5.4.1.9</a>.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(<a class="struct" href="../ecc/struct.X.html" title="struct halo2_gadgets::ecc::X">X</a>&lt;C, EccChip&gt;, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;SinsemillaChip::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.RunningSum" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::RunningSum">RunningSum</a>&gt;), Error&gt;</h4></section></summary><div class="docblock"><p>$\mathsf{SinsemillaHash}$ from <a href="https://zips.z.cash/protocol/protocol.pdf#concretesinsemillahash">§ 5.4.1.9</a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Debug-for-HashDomain%3CC,+SinsemillaChip,+EccChip,+K,+MAX_WORDS%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#268">source</a><a href="#impl-Debug-for-HashDomain%3CC,+SinsemillaChip,+EccChip,+K,+MAX_WORDS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + CurveAffine, SinsemillaChip, EccChip, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.HashDomain.html" title="struct halo2_gadgets::sinsemilla::HashDomain">HashDomain</a>&lt;C, SinsemillaChip, EccChip, K, MAX_WORDS&gt;<span class="where fmt-newline">where
SinsemillaChip: <a class="trait" href="trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt; + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,
EccChip: <a class="trait" href="../ecc/trait.EccInstructions.html" title="trait halo2_gadgets::ecc::EccInstructions">EccInstructions</a>&lt;C, NonIdentityPoint = &lt;SinsemillaChip as <a class="trait" href="trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt;&gt;::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.NonIdentityPoint" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::NonIdentityPoint">NonIdentityPoint</a>, FixedPoints = &lt;SinsemillaChip as <a class="trait" href="trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt;&gt;::<a class="associatedtype" href="trait.SinsemillaInstructions.html#associatedtype.FixedPoints" title="type halo2_gadgets::sinsemilla::SinsemillaInstructions::FixedPoints">FixedPoints</a>&gt; + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#268">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-HashDomain%3CC,+SinsemillaChip,+EccChip,+K,+MAX_WORDS%3E" class="impl"><a href="#impl-RefUnwindSafe-for-HashDomain%3CC,+SinsemillaChip,+EccChip,+K,+MAX_WORDS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;C, SinsemillaChip, EccChip, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.HashDomain.html" title="struct halo2_gadgets::sinsemilla::HashDomain">HashDomain</a>&lt;C, SinsemillaChip, EccChip, K, MAX_WORDS&gt;<span class="where fmt-newline">where

View File

@ -20,15 +20,15 @@
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-MessagePiece%3CC,+SinsemillaChip,+K,+MAX_WORDS%3E-1" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#183-264">source</a><a href="#impl-MessagePiece%3CC,+SinsemillaChip,+K,+MAX_WORDS%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;C: CurveAffine, SinsemillaChip, const K: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, const MAX_WORDS: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt; <a class="struct" href="struct.MessagePiece.html" title="struct halo2_gadgets::sinsemilla::MessagePiece">MessagePiece</a>&lt;C, SinsemillaChip, K, MAX_WORDS&gt;<span class="where fmt-newline">where
SinsemillaChip: <a class="trait" href="trait.SinsemillaInstructions.html" title="trait halo2_gadgets::sinsemilla::SinsemillaInstructions">SinsemillaInstructions</a>&lt;C, K, MAX_WORDS&gt; + <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_field_elem" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#222-230">source</a><h4 class="code-header">pub fn <a href="#method.from_field_elem" class="fn">from_field_elem</a>(
chip: SinsemillaChip,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
field_elem: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C::Base&gt;,
layouter: impl Layouter&lt;C::Base&gt;,
field_elem: Value&lt;C::Base&gt;,
num_words: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Constructs a MessagePiece from a field element.</p>
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, Error&gt;</h4></section></summary><div class="docblock"><p>Constructs a MessagePiece from a field element.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_subpieces" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla.rs.html#241-263">source</a><h4 class="code-header">pub fn <a href="#method.from_subpieces" class="fn">from_subpieces</a>(
chip: SinsemillaChip,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;C::Base&gt;,
subpieces: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="struct" href="../utilities/struct.RangeConstrained.html" title="struct halo2_gadgets::utilities::RangeConstrained">RangeConstrained</a>&lt;C::Base, <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;C::Base&gt;&gt;&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Constructs a <code>MessagePiece</code> by concatenating a sequence of <a href="../utilities/struct.RangeConstrained.html" title="struct halo2_gadgets::utilities::RangeConstrained"><code>RangeConstrained</code></a>
layouter: impl Layouter&lt;C::Base&gt;,
subpieces: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="struct" href="../utilities/struct.RangeConstrained.html" title="struct halo2_gadgets::utilities::RangeConstrained">RangeConstrained</a>&lt;C::Base, Value&lt;C::Base&gt;&gt;&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, Error&gt;</h4></section></summary><div class="docblock"><p>Constructs a <code>MessagePiece</code> by concatenating a sequence of <a href="../utilities/struct.RangeConstrained.html" title="struct halo2_gadgets::utilities::RangeConstrained"><code>RangeConstrained</code></a>
subpiece values.</p>
<p>The <code>MessagePiece</code> is assigned to the circuit, but not constrained in any way.</p>
<h5 id="panics"><a href="#panics">Panics</a></h5>

File diff suppressed because one or more lines are too long

View File

@ -15,27 +15,27 @@
</script>
</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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../../halo2_gadgets/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../../halo2_gadgets/index.html"><img class="rust-logo" src="../../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">CondSwapChip</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.configure">configure</a></li><li><a href="#method.construct">construct</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Chip%3CF%3E-for-CondSwapChip%3CF%3E">Chip&lt;F&gt;</a></li><li><a href="#impl-Clone-for-CondSwapChip%3CF%3E">Clone</a></li><li><a href="#impl-CondSwapInstructions%3CF%3E-for-CondSwapChip%3CF%3E">CondSwapInstructions&lt;F&gt;</a></li><li><a href="#impl-Debug-for-CondSwapChip%3CF%3E">Debug</a></li><li><a href="#impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E">UtilitiesInstructions&lt;F&gt;</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-CondSwapChip%3CF%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CondSwapChip%3CF%3E">Send</a></li><li><a href="#impl-Sync-for-CondSwapChip%3CF%3E">Sync</a></li><li><a href="#impl-Unpin-for-CondSwapChip%3CF%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CondSwapChip%3CF%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-CondSwapChip%3CF%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-CondSwapChip%3CF%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-CondSwapChip%3CF%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-Conv-for-CondSwapChip%3CF%3E">Conv</a></li><li><a href="#impl-FmtForward-for-CondSwapChip%3CF%3E">FmtForward</a></li><li><a href="#impl-From%3CT%3E-for-CondSwapChip%3CF%3E">From&lt;T&gt;</a></li><li><a href="#impl-Instrument-for-CondSwapChip%3CF%3E">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-CondSwapChip%3CF%3E">Into&lt;U&gt;</a></li><li><a href="#impl-Pipe-for-CondSwapChip%3CF%3E">Pipe</a></li><li><a href="#impl-Pointable-for-CondSwapChip%3CF%3E">Pointable</a></li><li><a href="#impl-Tap-for-CondSwapChip%3CF%3E">Tap</a></li><li><a href="#impl-ToOwned-for-CondSwapChip%3CF%3E">ToOwned</a></li><li><a href="#impl-TryConv-for-CondSwapChip%3CF%3E">TryConv</a></li><li><a href="#impl-TryFrom%3CU%3E-for-CondSwapChip%3CF%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-CondSwapChip%3CF%3E">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-CondSwapChip%3CF%3E">VZip&lt;V&gt;</a></li><li><a href="#impl-WithSubscriber-for-CondSwapChip%3CF%3E">WithSubscriber</a></li></ul></section><h2><a href="index.html">In halo2_gadgets::utilities::cond_swap</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../../index.html">halo2_gadgets</a>::<wbr><a href="../index.html">utilities</a>::<wbr><a href="index.html">cond_swap</a>::<wbr><a class="struct" href="#">CondSwapChip</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#31-34">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct CondSwapChip&lt;F&gt; { /* private fields */ }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A chip implementing a conditional swap.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#126-193">source</a><a href="#impl-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: PrimeField&gt; <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.configure" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#132-184">source</a><h4 class="code-header">pub fn <a href="#method.configure" class="fn">configure</a>(
meta: &amp;mut <a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.ConstraintSystem.html" title="struct halo2_proofs::plonk::circuit::ConstraintSystem">ConstraintSystem</a>&lt;F&gt;,
advices: [<a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Advice.html" title="struct halo2_proofs::plonk::circuit::Advice">Advice</a>&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">5</a>]
meta: &amp;mut ConstraintSystem&lt;F&gt;,
advices: [Column&lt;Advice&gt;; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">5</a>]
) -&gt; <a class="struct" href="struct.CondSwapConfig.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapConfig">CondSwapConfig</a></h4></section></summary><div class="docblock"><p>Configures this chip for use in a circuit.</p>
<h5 id="side-effects"><a href="#side-effects">Side-effects</a></h5>
<p><code>advices[0]</code> will be equality-enabled.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.construct" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#187-192">source</a><h4 class="code-header">pub fn <a href="#method.construct" class="fn">construct</a>(config: <a class="struct" href="struct.CondSwapConfig.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapConfig">CondSwapConfig</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Constructs a <a href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip"><code>CondSwapChip</code></a> given a <a href="struct.CondSwapConfig.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapConfig"><code>CondSwapConfig</code></a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Chip%3CF%3E-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#36-47">source</a><a href="#impl-Chip%3CF%3E-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="../../../halo2_proofs/circuit/trait.Chip.html" title="trait halo2_proofs::circuit::Chip">Chip</a>&lt;F&gt; for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Config" class="associatedtype trait-impl"><a href="#associatedtype.Config" class="anchor">§</a><h4 class="code-header">type <a href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Config" class="associatedtype">Config</a> = <a class="struct" href="struct.CondSwapConfig.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapConfig">CondSwapConfig</a></h4></section></summary><div class='docblock'>A type that holds the configuration for this chip, and any other state it may need
during circuit synthesis, that can be derived during <a href="../../../halo2_proofs/plonk/circuit/trait.Circuit.html#tymethod.configure" title="associated function halo2_proofs::plonk::circuit::Circuit::configure"><code>Circuit::configure</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.Loaded" class="associatedtype trait-impl"><a href="#associatedtype.Loaded" class="anchor">§</a><h4 class="code-header">type <a href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Loaded" class="associatedtype">Loaded</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section></summary><div class='docblock'>A type that holds any general chip state that needs to be loaded at the start of
<a href="../../../halo2_proofs/plonk/circuit/trait.Circuit.html#tymethod.synthesize" title="method halo2_proofs::plonk::circuit::Circuit::synthesize"><code>Circuit::synthesize</code></a>. This might simply be <code>()</code> for some chips.</div></details><details class="toggle method-toggle" open><summary><section id="method.config" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#40-42">source</a><a href="#method.config" class="anchor">§</a><h4 class="code-header">fn <a href="../../../halo2_proofs/circuit/trait.Chip.html#tymethod.config" class="fn">config</a>(&amp;self) -&gt; &amp;Self::<a class="associatedtype" href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Config" title="type halo2_proofs::circuit::Chip::Config">Config</a></h4></section></summary><div class='docblock'>The chip holds its own configuration.</div></details><details class="toggle method-toggle" open><summary><section id="method.loaded" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#44-46">source</a><a href="#method.loaded" class="anchor">§</a><h4 class="code-header">fn <a href="../../../halo2_proofs/circuit/trait.Chip.html#tymethod.loaded" class="fn">loaded</a>(&amp;self) -&gt; &amp;Self::<a class="associatedtype" href="../../../halo2_proofs/circuit/trait.Chip.html#associatedtype.Loaded" title="type halo2_proofs::circuit::Chip::Loaded">Loaded</a></h4></section></summary><div class='docblock'>Provides access to general chip state loaded at the beginning of circuit
synthesis. <a href="../../../halo2_proofs/circuit/trait.Chip.html#tymethod.loaded">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#30">source</a><a href="#impl-Clone-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#30">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CondSwapInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#71-124">source</a><a href="#impl-CondSwapInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: PrimeField&gt; <a class="trait" href="trait.CondSwapInstructions.html" title="trait halo2_gadgets::utilities::cond_swap::CondSwapInstructions">CondSwapInstructions</a>&lt;F&gt; for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.swap" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#73-123">source</a><a href="#method.swap" class="anchor">§</a><h4 class="code-header">fn <a href="trait.CondSwapInstructions.html#tymethod.swap" class="fn">swap</a>(
</div></details></div></details></div><h2 id="trait-implementations" class="small-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-Chip%3CF%3E-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#36-47">source</a><a href="#impl-Chip%3CF%3E-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; Chip&lt;F&gt; for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Config" class="associatedtype trait-impl"><a href="#associatedtype.Config" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Config</a> = <a class="struct" href="struct.CondSwapConfig.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapConfig">CondSwapConfig</a></h4></section></summary><div class='docblock'>A type that holds the configuration for this chip, and any other state it may need
during circuit synthesis, that can be derived during <a href="crate::plonk::Circuit::configure"><code>Circuit::configure</code></a>.</div></details><details class="toggle" open><summary><section id="associatedtype.Loaded" class="associatedtype trait-impl"><a href="#associatedtype.Loaded" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Loaded</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section></summary><div class='docblock'>A type that holds any general chip state that needs to be loaded at the start of
<a href="crate::plonk::Circuit::synthesize"><code>Circuit::synthesize</code></a>. This might simply be <code>()</code> for some chips.</div></details><details class="toggle method-toggle" open><summary><section id="method.config" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#40-42">source</a><a href="#method.config" class="anchor">§</a><h4 class="code-header">fn <a class="fn">config</a>(&amp;self) -&gt; &amp;Self::Config</h4></section></summary><div class='docblock'>The chip holds its own configuration.</div></details><details class="toggle method-toggle" open><summary><section id="method.loaded" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#44-46">source</a><a href="#method.loaded" class="anchor">§</a><h4 class="code-header">fn <a class="fn">loaded</a>(&amp;self) -&gt; &amp;Self::Loaded</h4></section></summary><div class='docblock'>Provides access to general chip state loaded at the beginning of circuit
synthesis. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#30">source</a><a href="#impl-Clone-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#30">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CondSwapInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#71-124">source</a><a href="#impl-CondSwapInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: PrimeField&gt; <a class="trait" href="trait.CondSwapInstructions.html" title="trait halo2_gadgets::utilities::cond_swap::CondSwapInstructions">CondSwapInstructions</a>&lt;F&gt; for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.swap" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#73-123">source</a><a href="#method.swap" class="anchor">§</a><h4 class="code-header">fn <a href="trait.CondSwapInstructions.html#tymethod.swap" class="fn">swap</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
pair: (Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;),
swap: <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>), <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Given an input pair (a,b) and a <code>swap</code> boolean flag, returns
(b,a) if <code>swap</code> is set, else (a,b) if <code>swap</code> is not set. <a href="trait.CondSwapInstructions.html#tymethod.swap">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#30">source</a><a href="#impl-Debug-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#30">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#67-69">source</a><a href="#impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="../trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;F&gt; for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Var" class="associatedtype trait-impl"><a href="#associatedtype.Var" class="anchor">§</a><h4 class="code-header">type <a href="../trait.UtilitiesInstructions.html#associatedtype.Var" class="associatedtype">Var</a> = <a class="struct" href="../../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;</h4></section></summary><div class='docblock'>Variable in the circuit.</div></details><details class="toggle method-toggle" open><summary><section id="method.load_private" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities.rs.html#59-73">source</a><a href="#method.load_private" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.UtilitiesInstructions.html#method.load_private" class="fn">load_private</a>(
layouter: impl Layouter&lt;F&gt;,
pair: (Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Value&lt;F&gt;),
swap: Value&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>), Error&gt;</h4></section></summary><div class='docblock'>Given an input pair (a,b) and a <code>swap</code> boolean flag, returns
(b,a) if <code>swap</code> is set, else (a,b) if <code>swap</code> is not set. <a href="trait.CondSwapInstructions.html#tymethod.swap">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#30">source</a><a href="#impl-Debug-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#30">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/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/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#67-69">source</a><a href="#impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="../trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;F&gt; for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Var" class="associatedtype trait-impl"><a href="#associatedtype.Var" class="anchor">§</a><h4 class="code-header">type <a href="../trait.UtilitiesInstructions.html#associatedtype.Var" class="associatedtype">Var</a> = AssignedCell&lt;F, F&gt;</h4></section></summary><div class='docblock'>Variable in the circuit.</div></details><details class="toggle method-toggle" open><summary><section id="method.load_private" class="method trait-impl"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities.rs.html#59-73">source</a><a href="#method.load_private" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.UtilitiesInstructions.html#method.load_private" class="fn">load_private</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
column: <a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../../halo2_proofs/plonk/circuit/struct.Advice.html" title="struct halo2_proofs::plonk::circuit::Advice">Advice</a>&gt;,
value: <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Load a variable.</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CondSwapChip%3CF%3E" class="impl"><a href="#impl-RefUnwindSafe-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;<span class="where fmt-newline">where
layouter: impl Layouter&lt;F&gt;,
column: Column&lt;Advice&gt;,
value: Value&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Error&gt;</h4></section></summary><div class='docblock'>Load a variable.</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CondSwapChip%3CF%3E" class="impl"><a href="#impl-RefUnwindSafe-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;<span class="where fmt-newline">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-CondSwapChip%3CF%3E" class="impl"><a href="#impl-Send-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;<span class="where fmt-newline">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-CondSwapChip%3CF%3E" class="impl"><a href="#impl-Sync-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;<span class="where fmt-newline">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-CondSwapChip%3CF%3E" class="impl"><a href="#impl-Unpin-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;<span class="where fmt-newline">where

View File

@ -17,17 +17,17 @@
// Required method
fn <a href="#tymethod.swap" class="fn">swap</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
pair: (Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;),
swap: <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>), <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;;
layouter: impl Layouter&lt;F&gt;,
pair: (Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Value&lt;F&gt;),
swap: Value&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>), Error&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Instructions for a conditional swap gadget.</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="toggle method-toggle" open><summary><section id="tymethod.swap" class="method"><a class="srclink rightside" href="../../../src/halo2_gadgets/utilities/cond_swap.rs.html#21-26">source</a><h4 class="code-header">fn <a href="#tymethod.swap" class="fn">swap</a>(
&amp;self,
layouter: impl <a class="trait" href="../../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
pair: (Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;),
swap: <a class="struct" href="../../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>), <a class="enum" href="../../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Given an input pair (a,b) and a <code>swap</code> boolean flag, returns
layouter: impl Layouter&lt;F&gt;,
pair: (Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Value&lt;F&gt;),
swap: Value&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;(Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Self::<a class="associatedtype" href="../trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>), Error&gt;</h4></section></summary><div class="docblock"><p>Given an input pair (a,b) and a <code>swap</code> boolean flag, returns
(b,a) if <code>swap</code> is set, else (a,b) if <code>swap</code> is not set.</p>
<p>The second element of the pair is required to be a witnessed
value, not a variable that already exists in the circuit.</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,5 +13,5 @@
});
});
</script>
</head><body class="rustdoc fn"><!--[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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In halo2_gadgets::utilities</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">utilities</a>::<wbr><a class="fn" href="#">bool_check</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/utilities.rs.html#133-135">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn bool_check&lt;F: PrimeField&gt;(value: <a class="enum" href="../../halo2_proofs/plonk/circuit/enum.Expression.html" title="enum halo2_proofs::plonk::circuit::Expression">Expression</a>&lt;F&gt;) -&gt; <a class="enum" href="../../halo2_proofs/plonk/circuit/enum.Expression.html" title="enum halo2_proofs::plonk::circuit::Expression">Expression</a>&lt;F&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Checks that an expression is either 1 or 0.</p>
</head><body class="rustdoc fn"><!--[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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In halo2_gadgets::utilities</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">utilities</a>::<wbr><a class="fn" href="#">bool_check</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/utilities.rs.html#133-135">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn bool_check&lt;F: PrimeField&gt;(value: Expression&lt;F&gt;) -&gt; Expression&lt;F&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Checks that an expression is either 1 or 0.</p>
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

View File

@ -14,8 +14,8 @@
});
</script>
</head><body class="rustdoc fn"><!--[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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In halo2_gadgets::utilities</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">utilities</a>::<wbr><a class="fn" href="#">range_check</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/utilities.rs.html#170-174">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn range_check&lt;F: PrimeField&gt;(
word: <a class="enum" href="../../halo2_proofs/plonk/circuit/enum.Expression.html" title="enum halo2_proofs::plonk::circuit::Expression">Expression</a>&lt;F&gt;,
word: Expression&lt;F&gt;,
range: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
) -&gt; <a class="enum" href="../../halo2_proofs/plonk/circuit/enum.Expression.html" title="enum halo2_proofs::plonk::circuit::Expression">Expression</a>&lt;F&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Check that an expression is in the small range [0..range),
) -&gt; Expression&lt;F&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Check that an expression is in the small range [0..range),
i.e. 0 ≤ word &lt; range.</p>
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

View File

@ -14,9 +14,9 @@
});
</script>
</head><body class="rustdoc fn"><!--[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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In halo2_gadgets::utilities</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">utilities</a>::<wbr><a class="fn" href="#">ternary</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/utilities.rs.html#140-143">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn ternary&lt;F: Field&gt;(
a: <a class="enum" href="../../halo2_proofs/plonk/circuit/enum.Expression.html" title="enum halo2_proofs::plonk::circuit::Expression">Expression</a>&lt;F&gt;,
b: <a class="enum" href="../../halo2_proofs/plonk/circuit/enum.Expression.html" title="enum halo2_proofs::plonk::circuit::Expression">Expression</a>&lt;F&gt;,
c: <a class="enum" href="../../halo2_proofs/plonk/circuit/enum.Expression.html" title="enum halo2_proofs::plonk::circuit::Expression">Expression</a>&lt;F&gt;
) -&gt; <a class="enum" href="../../halo2_proofs/plonk/circuit/enum.Expression.html" title="enum halo2_proofs::plonk::circuit::Expression">Expression</a>&lt;F&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>If <code>a</code> then <code>b</code>, else <code>c</code>. Returns (a * b) + (1 - a) * c.</p>
a: Expression&lt;F&gt;,
b: Expression&lt;F&gt;,
c: Expression&lt;F&gt;
) -&gt; Expression&lt;F&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>If <code>a</code> then <code>b</code>, else <code>c</code>. Returns (a * b) + (1 - a) * c.</p>
<p><code>a</code> must be a boolean-constrained expression.</p>
</div></details></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">FieldValue</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.value">value</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-FieldValue%3CF%3E-for-AssignedCell%3CF,+F%3E">AssignedCell&lt;F, F&gt;</a></li><li><a href="#impl-FieldValue%3CF%3E-for-Value%3CF%3E">Value&lt;F&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::utilities</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">utilities</a>::<wbr><a class="trait" href="#">FieldValue</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/utilities.rs.html#17-20">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait FieldValue&lt;F: Field&gt; {
// Required method
fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;F</a>&gt;;
fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; Value&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;F</a>&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A type that has a value at either keygen or proving time.</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="toggle method-toggle" open><summary><section id="tymethod.value" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#19">source</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;F</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the value of this type.</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="toggle implementors-toggle"><summary><section id="impl-FieldValue%3CF%3E-for-Value%3CF%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#22-26">source</a><a href="#impl-FieldValue%3CF%3E-for-Value%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.FieldValue.html" title="trait halo2_gadgets::utilities::FieldValue">FieldValue</a>&lt;F&gt; for <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><section id="method.value" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#23-25">source</a><a href="#method.value" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;F</a>&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-FieldValue%3CF%3E-for-AssignedCell%3CF,+F%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#28-32">source</a><a href="#impl-FieldValue%3CF%3E-for-AssignedCell%3CF,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.FieldValue.html" title="trait halo2_gadgets::utilities::FieldValue">FieldValue</a>&lt;F&gt; for <a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;</h3></section></summary><div class="impl-items"><section id="method.value-1" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#29-31">source</a><a href="#method.value-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;F</a>&gt;</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../implementors/halo2_gadgets/utilities/trait.FieldValue.js" data-ignore-extern-crates="halo2_proofs" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>
</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="toggle method-toggle" open><summary><section id="tymethod.value" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#19">source</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; Value&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;F</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the value of this type.</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="toggle implementors-toggle"><summary><section id="impl-FieldValue%3CF%3E-for-Value%3CF%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#22-26">source</a><a href="#impl-FieldValue%3CF%3E-for-Value%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.FieldValue.html" title="trait halo2_gadgets::utilities::FieldValue">FieldValue</a>&lt;F&gt; for Value&lt;F&gt;</h3></section></summary><div class="impl-items"><section id="method.value" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#23-25">source</a><a href="#method.value" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; Value&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;F</a>&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-FieldValue%3CF%3E-for-AssignedCell%3CF,+F%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#28-32">source</a><a href="#impl-FieldValue%3CF%3E-for-AssignedCell%3CF,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.FieldValue.html" title="trait halo2_gadgets::utilities::FieldValue">FieldValue</a>&lt;F&gt; for AssignedCell&lt;F, F&gt;</h3></section></summary><div class="impl-items"><section id="method.value-1" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#29-31">source</a><a href="#method.value-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; Value&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;F</a>&gt;</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../implementors/halo2_gadgets/utilities/trait.FieldValue.js" data-ignore-extern-crates="halo2_proofs" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

View File

@ -19,19 +19,19 @@
// Provided method
fn <a href="#method.load_private" class="fn">load_private</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
column: <a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Advice.html" title="struct halo2_proofs::plonk::circuit::Advice">Advice</a>&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt; { ... }
layouter: impl Layouter&lt;F&gt;,
column: Column&lt;Advice&gt;,
value: Value&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Error&gt; { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait for utilities used across circuits.</p>
</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Var" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#56">source</a><h4 class="code-header">type <a href="#associatedtype.Var" class="associatedtype">Var</a>: <a class="trait" href="trait.Var.html" title="trait halo2_gadgets::utilities::Var">Var</a>&lt;F&gt;</h4></section></summary><div class="docblock"><p>Variable in the circuit.</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="toggle method-toggle" open><summary><section id="method.load_private" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#59-73">source</a><h4 class="code-header">fn <a href="#method.load_private" class="fn">load_private</a>(
&amp;self,
layouter: impl <a class="trait" href="../../halo2_proofs/circuit/trait.Layouter.html" title="trait halo2_proofs::circuit::Layouter">Layouter</a>&lt;F&gt;,
column: <a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Column.html" title="struct halo2_proofs::plonk::circuit::Column">Column</a>&lt;<a class="struct" href="../../halo2_proofs/plonk/circuit/struct.Advice.html" title="struct halo2_proofs::plonk::circuit::Advice">Advice</a>&gt;,
value: <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, <a class="enum" href="../../halo2_proofs/plonk/error/enum.Error.html" title="enum halo2_proofs::plonk::error::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Load a variable.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities/cond_swap.rs.html#67-69">source</a><a href="#impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;F&gt; for <a class="struct" href="cond_swap/struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Var-1" class="associatedtype trait-impl"><a href="#associatedtype.Var-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Var" class="associatedtype">Var</a> = <a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UtilitiesInstructions%3CFp%3E-for-EccChip%3CFixed%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc/chip.rs.html#247-251">source</a><a href="#impl-UtilitiesInstructions%3CFp%3E-for-EccChip%3CFixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Fixed: <a class="trait" href="../ecc/trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt; <a class="trait" href="trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;Fp&gt; for <a class="struct" href="../ecc/chip/struct.EccChip.html" title="struct halo2_gadgets::ecc::chip::EccChip">EccChip</a>&lt;Fixed&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Var-2" class="associatedtype trait-impl"><a href="#associatedtype.Var-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Var" class="associatedtype">Var</a> = <a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;Fp, Fp&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UtilitiesInstructions%3CFp%3E-for-MerkleChip%3CHash,+Commit,+F%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla/merkle/chip.rs.html#418-425">source</a><a href="#impl-UtilitiesInstructions%3CFp%3E-for-MerkleChip%3CHash,+Commit,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, F&gt; <a class="trait" href="trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;Fp&gt; for <a class="struct" href="../sinsemilla/merkle/chip/struct.MerkleChip.html" title="struct halo2_gadgets::sinsemilla::merkle::chip::MerkleChip">MerkleChip</a>&lt;Hash, Commit, F&gt;<span class="where fmt-newline">where
layouter: impl Layouter&lt;F&gt;,
column: Column&lt;Advice&gt;,
value: Value&lt;F&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="trait.UtilitiesInstructions.html#associatedtype.Var" title="type halo2_gadgets::utilities::UtilitiesInstructions::Var">Var</a>, Error&gt;</h4></section></summary><div class="docblock"><p>Load a variable.</p>
</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities/cond_swap.rs.html#67-69">source</a><a href="#impl-UtilitiesInstructions%3CF%3E-for-CondSwapChip%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;F&gt; for <a class="struct" href="cond_swap/struct.CondSwapChip.html" title="struct halo2_gadgets::utilities::cond_swap::CondSwapChip">CondSwapChip</a>&lt;F&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Var-1" class="associatedtype trait-impl"><a href="#associatedtype.Var-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Var" class="associatedtype">Var</a> = AssignedCell&lt;F, F&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UtilitiesInstructions%3CFp%3E-for-EccChip%3CFixed%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/ecc/chip.rs.html#247-251">source</a><a href="#impl-UtilitiesInstructions%3CFp%3E-for-EccChip%3CFixed%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Fixed: <a class="trait" href="../ecc/trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;&gt; <a class="trait" href="trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;Fp&gt; for <a class="struct" href="../ecc/chip/struct.EccChip.html" title="struct halo2_gadgets::ecc::chip::EccChip">EccChip</a>&lt;Fixed&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.Var-2" class="associatedtype trait-impl"><a href="#associatedtype.Var-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Var" class="associatedtype">Var</a> = AssignedCell&lt;Fp, Fp&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UtilitiesInstructions%3CFp%3E-for-MerkleChip%3CHash,+Commit,+F%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/sinsemilla/merkle/chip.rs.html#418-425">source</a><a href="#impl-UtilitiesInstructions%3CFp%3E-for-MerkleChip%3CHash,+Commit,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;Hash, Commit, F&gt; <a class="trait" href="trait.UtilitiesInstructions.html" title="trait halo2_gadgets::utilities::UtilitiesInstructions">UtilitiesInstructions</a>&lt;Fp&gt; for <a class="struct" href="../sinsemilla/merkle/chip/struct.MerkleChip.html" title="struct halo2_gadgets::sinsemilla::merkle::chip::MerkleChip">MerkleChip</a>&lt;Hash, Commit, F&gt;<span class="where fmt-newline">where
Hash: <a class="trait" href="../sinsemilla/trait.HashDomains.html" title="trait halo2_gadgets::sinsemilla::HashDomains">HashDomains</a>&lt;Affine&gt;,
F: <a class="trait" href="../ecc/trait.FixedPoints.html" title="trait halo2_gadgets::ecc::FixedPoints">FixedPoints</a>&lt;Affine&gt;,
Commit: <a class="trait" href="../sinsemilla/trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, F, Hash&gt;,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Var-3" class="associatedtype trait-impl"><a href="#associatedtype.Var-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Var" class="associatedtype">Var</a> = <a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;Fp, Fp&gt;</h4></section></div></details></div><script src="../../implementors/halo2_gadgets/utilities/trait.UtilitiesInstructions.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>
Commit: <a class="trait" href="../sinsemilla/trait.CommitDomains.html" title="trait halo2_gadgets::sinsemilla::CommitDomains">CommitDomains</a>&lt;Affine, F, Hash&gt;,</span></h3></section></summary><div class="impl-items"><section id="associatedtype.Var-3" class="associatedtype trait-impl"><a href="#associatedtype.Var-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Var" class="associatedtype">Var</a> = AssignedCell&lt;Fp, Fp&gt;</h4></section></div></details></div><script src="../../implementors/halo2_gadgets/utilities/trait.UtilitiesInstructions.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

View File

@ -13,11 +13,11 @@
});
});
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Var</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.cell">cell</a></li><li><a href="#tymethod.value">value</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Var%3CF%3E-for-AssignedCell%3CF,+F%3E">AssignedCell&lt;F, F&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::utilities</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">utilities</a>::<wbr><a class="trait" href="#">Var</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/utilities.rs.html#35-41">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Var&lt;F: Field&gt;: <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;&gt; {
</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="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../halo2_gadgets/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Var</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.cell">cell</a></li><li><a href="#tymethod.value">value</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Var%3CF%3E-for-AssignedCell%3CF,+F%3E">AssignedCell&lt;F, F&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In halo2_gadgets::utilities</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">halo2_gadgets</a>::<wbr><a href="index.html">utilities</a>::<wbr><a class="trait" href="#">Var</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/halo2_gadgets/utilities.rs.html#35-41">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Var&lt;F: Field&gt;: <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;AssignedCell&lt;F, F&gt;&gt; {
// Required methods
fn <a href="#tymethod.cell" class="fn">cell</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/struct.Cell.html" title="struct halo2_proofs::circuit::Cell">Cell</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;;
fn <a href="#tymethod.cell" class="fn">cell</a>(&amp;self) -&gt; Cell;
<span class="item-spacer"></span> fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; Value&lt;F&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait for a variable in the circuit.</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="toggle method-toggle" open><summary><section id="tymethod.cell" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#37">source</a><h4 class="code-header">fn <a href="#tymethod.cell" class="fn">cell</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/struct.Cell.html" title="struct halo2_proofs::circuit::Cell">Cell</a></h4></section></summary><div class="docblock"><p>The cell at which this variable was allocated.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.value" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#40">source</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;</h4></section></summary><div class="docblock"><p>The value allocated to this variable.</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="toggle implementors-toggle"><summary><section id="impl-Var%3CF%3E-for-AssignedCell%3CF,+F%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#43-51">source</a><a href="#impl-Var%3CF%3E-for-AssignedCell%3CF,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.Var.html" title="trait halo2_gadgets::utilities::Var">Var</a>&lt;F&gt; for <a class="struct" href="../../halo2_proofs/circuit/struct.AssignedCell.html" title="struct halo2_proofs::circuit::AssignedCell">AssignedCell</a>&lt;F, F&gt;</h3></section></summary><div class="impl-items"><section id="method.cell" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#44-46">source</a><a href="#method.cell" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.cell" class="fn">cell</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/struct.Cell.html" title="struct halo2_proofs::circuit::Cell">Cell</a></h4></section><section id="method.value" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#48-50">source</a><a href="#method.value" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; <a class="struct" href="../../halo2_proofs/circuit/value/struct.Value.html" title="struct halo2_proofs::circuit::value::Value">Value</a>&lt;F&gt;</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Var%3CF%3E-for-StateWord%3CF%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#418-426">source</a><a href="#impl-Var%3CF%3E-for-StateWord%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.Var.html" title="trait halo2_gadgets::utilities::Var">Var</a>&lt;F&gt; for <a class="struct" href="../poseidon/struct.StateWord.html" title="struct halo2_gadgets::poseidon::StateWord">StateWord</a>&lt;F&gt;</h3></section></div><script src="../../implementors/halo2_gadgets/utilities/trait.Var.js" data-ignore-extern-crates="halo2_proofs" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>
</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="toggle method-toggle" open><summary><section id="tymethod.cell" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#37">source</a><h4 class="code-header">fn <a href="#tymethod.cell" class="fn">cell</a>(&amp;self) -&gt; Cell</h4></section></summary><div class="docblock"><p>The cell at which this variable was allocated.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.value" class="method"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#40">source</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; Value&lt;F&gt;</h4></section></summary><div class="docblock"><p>The value allocated to this variable.</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="toggle implementors-toggle"><summary><section id="impl-Var%3CF%3E-for-AssignedCell%3CF,+F%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#43-51">source</a><a href="#impl-Var%3CF%3E-for-AssignedCell%3CF,+F%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.Var.html" title="trait halo2_gadgets::utilities::Var">Var</a>&lt;F&gt; for AssignedCell&lt;F, F&gt;</h3></section></summary><div class="impl-items"><section id="method.cell" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#44-46">source</a><a href="#method.cell" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.cell" class="fn">cell</a>(&amp;self) -&gt; Cell</h4></section><section id="method.value" class="method trait-impl"><a class="srclink rightside" href="../../src/halo2_gadgets/utilities.rs.html#48-50">source</a><a href="#method.value" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.value" class="fn">value</a>(&amp;self) -&gt; Value&lt;F&gt;</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Var%3CF%3E-for-StateWord%3CF%3E" class="impl"><a class="srclink rightside" href="../../src/halo2_gadgets/poseidon/pow5.rs.html#418-426">source</a><a href="#impl-Var%3CF%3E-for-StateWord%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;F: Field&gt; <a class="trait" href="trait.Var.html" title="trait halo2_gadgets::utilities::Var">Var</a>&lt;F&gt; for <a class="struct" href="../poseidon/struct.StateWord.html" title="struct halo2_gadgets::poseidon::StateWord">StateWord</a>&lt;F&gt;</h3></section></div><script src="../../implementors/halo2_gadgets/utilities/trait.Var.js" data-ignore-extern-crates="halo2_proofs" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
(function() {var implementors = {
"halo2_gadgets":[["impl&lt;F: Field&gt; <a class=\"trait\" href=\"halo2_proofs/circuit/trait.Chip.html\" title=\"trait halo2_proofs::circuit::Chip\">Chip</a>&lt;F&gt; for <a class=\"struct\" href=\"halo2_gadgets/utilities/cond_swap/struct.CondSwapChip.html\" title=\"struct halo2_gadgets::utilities::cond_swap::CondSwapChip\">CondSwapChip</a>&lt;F&gt;"],["impl&lt;FixedPoints: <a class=\"trait\" href=\"halo2_gadgets/ecc/trait.FixedPoints.html\" title=\"trait halo2_gadgets::ecc::FixedPoints\">FixedPoints</a>&lt;Affine&gt;&gt; <a class=\"trait\" href=\"halo2_proofs/circuit/trait.Chip.html\" title=\"trait halo2_proofs::circuit::Chip\">Chip</a>&lt;Fp&gt; for <a class=\"struct\" href=\"halo2_gadgets/ecc/chip/struct.EccChip.html\" title=\"struct halo2_gadgets::ecc::chip::EccChip\">EccChip</a>&lt;FixedPoints&gt;"],["impl&lt;F: Field, const WIDTH: <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>, const RATE: <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt; <a class=\"trait\" href=\"halo2_proofs/circuit/trait.Chip.html\" title=\"trait halo2_proofs::circuit::Chip\">Chip</a>&lt;F&gt; for <a class=\"struct\" href=\"halo2_gadgets/poseidon/struct.Pow5Chip.html\" title=\"struct halo2_gadgets::poseidon::Pow5Chip\">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;"],["impl&lt;Hash, Commit, Fixed&gt; <a class=\"trait\" href=\"halo2_proofs/circuit/trait.Chip.html\" title=\"trait halo2_proofs::circuit::Chip\">Chip</a>&lt;Fp&gt; for <a class=\"struct\" href=\"halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleChip.html\" title=\"struct halo2_gadgets::sinsemilla::merkle::chip::MerkleChip\">MerkleChip</a>&lt;Hash, Commit, Fixed&gt;<span class=\"where fmt-newline\">where\n Hash: <a class=\"trait\" href=\"halo2_gadgets/sinsemilla/trait.HashDomains.html\" title=\"trait halo2_gadgets::sinsemilla::HashDomains\">HashDomains</a>&lt;Affine&gt;,\n Fixed: <a class=\"trait\" href=\"halo2_gadgets/ecc/trait.FixedPoints.html\" title=\"trait halo2_gadgets::ecc::FixedPoints\">FixedPoints</a>&lt;Affine&gt;,\n Commit: <a class=\"trait\" href=\"halo2_gadgets/sinsemilla/trait.CommitDomains.html\" title=\"trait halo2_gadgets::sinsemilla::CommitDomains\">CommitDomains</a>&lt;Affine, Fixed, Hash&gt;,</span>"],["impl <a class=\"trait\" href=\"halo2_proofs/circuit/trait.Chip.html\" title=\"trait halo2_proofs::circuit::Chip\">Chip</a>&lt;Fp&gt; for <a class=\"struct\" href=\"halo2_gadgets/sha256/struct.Table16Chip.html\" title=\"struct halo2_gadgets::sha256::Table16Chip\">Table16Chip</a>"],["impl&lt;Hash, Commit, Fixed&gt; <a class=\"trait\" href=\"halo2_proofs/circuit/trait.Chip.html\" title=\"trait halo2_proofs::circuit::Chip\">Chip</a>&lt;Fp&gt; for <a class=\"struct\" href=\"halo2_gadgets/sinsemilla/chip/struct.SinsemillaChip.html\" title=\"struct halo2_gadgets::sinsemilla::chip::SinsemillaChip\">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;<span class=\"where fmt-newline\">where\n Hash: <a class=\"trait\" href=\"halo2_gadgets/sinsemilla/trait.HashDomains.html\" title=\"trait halo2_gadgets::sinsemilla::HashDomains\">HashDomains</a>&lt;Affine&gt;,\n Fixed: <a class=\"trait\" href=\"halo2_gadgets/ecc/trait.FixedPoints.html\" title=\"trait halo2_gadgets::ecc::FixedPoints\">FixedPoints</a>&lt;Affine&gt;,\n Commit: <a class=\"trait\" href=\"halo2_gadgets/sinsemilla/trait.CommitDomains.html\" title=\"trait halo2_gadgets::sinsemilla::CommitDomains\">CommitDomains</a>&lt;Affine, Fixed, Hash&gt;,</span>"]]
"halo2_gadgets":[["impl&lt;F: Field&gt; Chip&lt;F&gt; for <a class=\"struct\" href=\"halo2_gadgets/utilities/cond_swap/struct.CondSwapChip.html\" title=\"struct halo2_gadgets::utilities::cond_swap::CondSwapChip\">CondSwapChip</a>&lt;F&gt;"],["impl&lt;FixedPoints: <a class=\"trait\" href=\"halo2_gadgets/ecc/trait.FixedPoints.html\" title=\"trait halo2_gadgets::ecc::FixedPoints\">FixedPoints</a>&lt;Affine&gt;&gt; Chip&lt;Fp&gt; for <a class=\"struct\" href=\"halo2_gadgets/ecc/chip/struct.EccChip.html\" title=\"struct halo2_gadgets::ecc::chip::EccChip\">EccChip</a>&lt;FixedPoints&gt;"],["impl&lt;F: Field, const WIDTH: <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>, const RATE: <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.usize.html\">usize</a>&gt; Chip&lt;F&gt; for <a class=\"struct\" href=\"halo2_gadgets/poseidon/struct.Pow5Chip.html\" title=\"struct halo2_gadgets::poseidon::Pow5Chip\">Pow5Chip</a>&lt;F, WIDTH, RATE&gt;"],["impl&lt;Hash, Commit, Fixed&gt; Chip&lt;Fp&gt; for <a class=\"struct\" href=\"halo2_gadgets/sinsemilla/merkle/chip/struct.MerkleChip.html\" title=\"struct halo2_gadgets::sinsemilla::merkle::chip::MerkleChip\">MerkleChip</a>&lt;Hash, Commit, Fixed&gt;<span class=\"where fmt-newline\">where\n Hash: <a class=\"trait\" href=\"halo2_gadgets/sinsemilla/trait.HashDomains.html\" title=\"trait halo2_gadgets::sinsemilla::HashDomains\">HashDomains</a>&lt;Affine&gt;,\n Fixed: <a class=\"trait\" href=\"halo2_gadgets/ecc/trait.FixedPoints.html\" title=\"trait halo2_gadgets::ecc::FixedPoints\">FixedPoints</a>&lt;Affine&gt;,\n Commit: <a class=\"trait\" href=\"halo2_gadgets/sinsemilla/trait.CommitDomains.html\" title=\"trait halo2_gadgets::sinsemilla::CommitDomains\">CommitDomains</a>&lt;Affine, Fixed, Hash&gt;,</span>"],["impl Chip&lt;Fp&gt; for <a class=\"struct\" href=\"halo2_gadgets/sha256/struct.Table16Chip.html\" title=\"struct halo2_gadgets::sha256::Table16Chip\">Table16Chip</a>"],["impl&lt;Hash, Commit, Fixed&gt; Chip&lt;Fp&gt; for <a class=\"struct\" href=\"halo2_gadgets/sinsemilla/chip/struct.SinsemillaChip.html\" title=\"struct halo2_gadgets::sinsemilla::chip::SinsemillaChip\">SinsemillaChip</a>&lt;Hash, Commit, Fixed&gt;<span class=\"where fmt-newline\">where\n Hash: <a class=\"trait\" href=\"halo2_gadgets/sinsemilla/trait.HashDomains.html\" title=\"trait halo2_gadgets::sinsemilla::HashDomains\">HashDomains</a>&lt;Affine&gt;,\n Fixed: <a class=\"trait\" href=\"halo2_gadgets/ecc/trait.FixedPoints.html\" title=\"trait halo2_gadgets::ecc::FixedPoints\">FixedPoints</a>&lt;Affine&gt;,\n Commit: <a class=\"trait\" href=\"halo2_gadgets/sinsemilla/trait.CommitDomains.html\" title=\"trait halo2_gadgets::sinsemilla::CommitDomains\">CommitDomains</a>&lt;Affine, Fixed, Hash&gt;,</span>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -13,4 +13,4 @@
});
});
</script>
</head><body class="rustdoc mod"><!--[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="logo-container" href="./halo2_gadgets/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="./halo2_gadgets/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all crates</h1><ul class="all-items"><li><a href="halo2/index.html">halo2</a></li><li><a href="halo2_gadgets/index.html">halo2_gadgets</a></li><li><a href="halo2_proofs/index.html">halo2_proofs</a></li></ul></section></div></main><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="halo2_gadgets" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>
</head><body class="rustdoc mod"><!--[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="logo-container" href="./halo2/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="./halo2/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all crates</h1><ul class="all-items"><li><a href="halo2/index.html">halo2</a></li><li><a href="halo2_gadgets/index.html">halo2_gadgets</a></li><li><a href="halo2_proofs/index.html">halo2_proofs</a></li></ul></section></div></main><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="halo2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0-nightly (f63ccaf25 2023-03-06)" data-search-js="search-8a59a8356673ec1f.js" data-settings-js="settings-f0c5c39777a9a2f6.js" data-settings-css="settings-0bcba95ff279c1db.css" ></div></body></html>