<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="`EncodedChallenge<C>` defines a challenge encoding with a [`Self::Input`] that is used to derive the challenge encoding and `get_challenge` obtains the real `C::Scalar` that the challenge encoding represents."><metaname="keywords"content="rust, rustlang, rust-lang, EncodedChallenge"><title>EncodedChallenge in halo2_proofs::transcript - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"type="text/css"href="../../normalize.css"><linkrel="stylesheet"type="text/css"href="../../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../../ayu.css"disabled><linkrel="stylesheet"type="text/css"href="../../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../../storage.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../main.js"></script><noscript><linkrel="stylesheet"href="../../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../../favicon.svg"><linkrel="stylesheet"href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css"integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y"crossorigin="anonymous">
</head><bodyclass="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../../halo2_proofs/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../../rust-logo.svg"alt="logo"></div>
</a><h2class="location"><ahref="#">EncodedChallenge</a></h2><divclass="sidebar-elems"><section><divclass="block"><h3class="sidebar-title"><ahref="#required-associated-types">Required Associated Types</a></h3><ul><li><ahref="#associatedtype.Input">Input</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#required-methods">Required Methods</a></h3><ul><li><ahref="#tymethod.get_scalar">get_scalar</a></li><li><ahref="#tymethod.new">new</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#provided-methods">Provided Methods</a></h3><ul><li><ahref="#method.as_challenge_scalar">as_challenge_scalar</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#implementors">Implementors</a></h3></div></section><h2class="location"><ahref="index.html">In halo2_proofs::transcript</a></h2></div></nav><main><divclass="width-limiter"><divclass="sub-container"><aclass="sub-logo-container"href="../../halo2_proofs/index.html"><imgclass="rust-logo"src="../../rust-logo.svg"alt="logo"></a><navclass="sub"><formclass="search-form"><divclass="search-container"><span></span><inputclass="search-input"name="search"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"title="help"tabindex="-1"><buttontype="button">?</button></div><divid="settings-menu"tabindex="-1">
}</code></pre></div><detailsclass="rustdoc-toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p><code>EncodedChallenge<C></code> defines a challenge encoding with a <ahref="trait.EncodedChallenge.html#associatedtype.Input"title="Self::Input"><code>Self::Input</code></a>
that is used to derive the challenge encoding and <code>get_challenge</code> obtains
the <em>real</em><code>C::Scalar</code> that the challenge encoding represents.</p>
</div></details><h2id="required-associated-types"class="small-section-header">Required Associated Types<ahref="#required-associated-types"class="anchor"></a></h2><divclass="methods"><detailsclass="rustdoc-toggle"open><summary><divid="associatedtype.Input"class="method has-srclink"><divclass="rightside"><aclass="srclink"href="../../src/halo2_proofs/transcript.rs.html#247">source</a></div><h4class="code-header">type <ahref="#associatedtype.Input"class="associatedtype">Input</a></h4></div></summary><divclass="docblock"><p>The Input type used to derive the challenge encoding. For example,
</div></details></div><h2id="required-methods"class="small-section-header">Required Methods<ahref="#required-methods"class="anchor"></a></h2><divclass="methods"><detailsclass="rustdoc-toggle"open><summary><divid="tymethod.new"class="method has-srclink"><divclass="rightside"><aclass="srclink"href="../../src/halo2_proofs/transcript.rs.html#250">source</a></div><h4class="code-header">fn <ahref="#tymethod.new"class="fnname">new</a>(challenge_input: &Self::<aclass="associatedtype"href="trait.EncodedChallenge.html#associatedtype.Input"title="type halo2_proofs::transcript::EncodedChallenge::Input">Input</a>) -> Self</h4></div></summary><divclass="docblock"><p>Get an encoded challenge from a given input challenge.</p>
</div></details><detailsclass="rustdoc-toggle"open><summary><divid="tymethod.get_scalar"class="method has-srclink"><divclass="rightside"><aclass="srclink"href="../../src/halo2_proofs/transcript.rs.html#253">source</a></div><h4class="code-header">fn <ahref="#tymethod.get_scalar"class="fnname">get_scalar</a>(&self) -> C::Scalar</h4></div></summary><divclass="docblock"><p>Get a scalar field element from an encoded challenge.</p>
</div></details></div><h2id="provided-methods"class="small-section-header">Provided Methods<ahref="#provided-methods"class="anchor"></a></h2><divclass="methods"><detailsclass="rustdoc-toggle"open><summary><divid="method.as_challenge_scalar"class="method has-srclink"><divclass="rightside"><aclass="srclink"href="../../src/halo2_proofs/transcript.rs.html#256-261">source</a></div><h4class="code-header">fn <ahref="#method.as_challenge_scalar"class="fnname">as_challenge_scalar</a><T>(&self) -><aclass="struct"href="struct.ChallengeScalar.html"title="struct halo2_proofs::transcript::ChallengeScalar">ChallengeScalar</a><C, T></h4></div></summary><divclass="docblock"><p>Cast an encoded challenge as a typed <code>ChallengeScalar</code>.</p>