halo2/rustdoc/latest/halo2_proofs/circuit/layouter/trait.TableLayouter.html

28 lines
13 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

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

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Helper trait for implementing a custom `Layouter`."><meta name="keywords" content="rust, rustlang, rust-lang, TableLayouter"><title>TableLayouter in halo2_proofs::circuit::layouter - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><script defer src="../../../main.js"></script>
<noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\(", right: "\\)", display: false},
{left: "$", right: "$", display: false},
{left: "\\[", right: "\\]", display: true}
]
});
});
</script>
</head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a class="sidebar-logo" href="../../../halo2_proofs/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div>
</a><h2 class="location"><a href="#">Trait TableLayouter</a></h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.assign_cell">assign_cell</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-From%3C%26%27r%20mut%20(dyn%20TableLayouter%3CF%3E%20+%20%27r)%3E">From&lt;&amp;&#39;r mut (dyn TableLayouter&lt;F&gt; + &#39;r)&gt;</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="../../index.html">halo2_proofs</a>::<wbr><a href="../index.html">circuit</a>::<wbr><a href="index.html">layouter</a></h2><div id="sidebar-vars" data-name="TableLayouter" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../halo2_proofs/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div>
<input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
<h1 class="fqn"><span class="in-band">Trait <a href="../../index.html">halo2_proofs</a>::<wbr><a href="../index.html">circuit</a>::<wbr><a href="index.html">layouter</a>::<wbr><a class="trait" href="#">TableLayouter</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/halo2_proofs/circuit/layouter.rs.html#112-123" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait TableLayouter&lt;F:&nbsp;<a class="trait" href="../../arithmetic/trait.Field.html" title="trait halo2_proofs::arithmetic::Field">Field</a>&gt;: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> {
fn <a href="#tymethod.assign_cell" class="fnname">assign_cell</a>&lt;'v&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;'v mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;annotation: &amp;'v (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a> + 'v), <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;column: <a class="struct" href="../../plonk/struct.TableColumn.html" title="struct halo2_proofs::plonk::TableColumn">TableColumn</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to: &amp;'v mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</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="enum" href="../../plonk/enum.Assigned.html" title="enum halo2_proofs::plonk::Assigned">Assigned</a>&lt;F&gt;, <a class="enum" href="../../plonk/enum.Error.html" title="enum halo2_proofs::plonk::Error">Error</a>&gt; + 'v)<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&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="../../plonk/enum.Error.html" title="enum halo2_proofs::plonk::Error">Error</a>&gt;;
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Helper trait for implementing a custom <a href="../trait.Layouter.html"><code>Layouter</code></a>.</p>
<p>This trait is used for implementing table assignments.</p>
</div></details><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.assign_cell" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/halo2_proofs/circuit/layouter.rs.html#116-122" title="goto source code">source</a></div><h4 class="code-header">fn <a href="#tymethod.assign_cell" class="fnname">assign_cell</a>&lt;'v&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;'v mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;annotation: &amp;'v (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a> + 'v), <br>&nbsp;&nbsp;&nbsp;&nbsp;column: <a class="struct" href="../../plonk/struct.TableColumn.html" title="struct halo2_proofs::plonk::TableColumn">TableColumn</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;to: &amp;'v mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</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="enum" href="../../plonk/enum.Assigned.html" title="enum halo2_proofs::plonk::Assigned">Assigned</a>&lt;F&gt;, <a class="enum" href="../../plonk/enum.Error.html" title="enum halo2_proofs::plonk::Error">Error</a>&gt; + 'v)<br>) -&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="../../plonk/enum.Error.html" title="enum halo2_proofs::plonk::Error">Error</a>&gt;</h4></div></summary><div class="docblock"><p>Assigns a fixed value to a table cell.</p>
<p>Returns an error if the table cell has already been assigned to.</p>
</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="rustdoc-toggle implementors-toggle" open><summary><div id="impl-From%3C%26%27r%20mut%20(dyn%20TableLayouter%3CF%3E%20+%20%27r)%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/halo2_proofs/circuit.rs.html#345-349" title="goto source code">source</a></div><a href="#impl-From%3C%26%27r%20mut%20(dyn%20TableLayouter%3CF%3E%20+%20%27r)%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;'r, F:&nbsp;<a class="trait" href="../../arithmetic/trait.Field.html" title="trait halo2_proofs::arithmetic::Field">Field</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;&amp;'r mut (dyn <a class="trait" href="trait.TableLayouter.html" title="trait halo2_proofs::circuit::layouter::TableLayouter">TableLayouter</a>&lt;F&gt; + 'r)&gt; for <a class="struct" href="../struct.Table.html" title="struct halo2_proofs::circuit::Table">Table</a>&lt;'r, F&gt;</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/halo2_proofs/circuit.rs.html#346-348" title="goto source code">source</a></div><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(table: &amp;'r mut dyn <a class="trait" href="trait.TableLayouter.html" title="trait halo2_proofs::circuit::layouter::TableLayouter">TableLayouter</a>&lt;F&gt;) -&gt; Self</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><script type="text/javascript" src="../../../implementors/halo2_proofs/circuit/layouter/trait.TableLayouter.js" async></script></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="halo2_proofs" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0-nightly (ee5d8d37b 2022-01-17)" ></div>
</body></html>