<!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="An abstraction for building Thompson NFAs by hand."><title>Builder in regex_automata::nfa::thompson - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../../static.files/rustdoc-ac92e1bbe349e143.css"><metaname="rustdoc-vars"data-root-path="../../../"data-static-root-path="../../../static.files/"data-current-crate="regex_automata"data-themes=""data-resource-suffix=""data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)"data-channel="1.76.0"data-search-js="search-2b6ce74ff89ae146.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../../static.files/storage-f2adc0d6ca4d09fb.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../../static.files/main-305769736d49e732.js"></script><noscript><linkrel="stylesheet"href="../../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><linkrel="alternate icon"type="image/png"href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc struct"><!--[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></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../../../regex_automata/index.html">regex_automata</a><spanclass="version">0.4.6</span></h2></div><h2class="location"><ahref="#">Builder</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.add_capture_end">add_capture_end</a></li><li><ahref="#method.add_capture_start">add_capture_start</a></li><li><ahref="#method.add_empty">add_empty</a></li><li><ahref="#method.add_fail">add_fail</a></li><li><ahref="#method.add_look">add_look</a></li><li><ahref="#method.add_match">add_match</a></li><li><ahref="#method.add_range">add_range</a></li><li><ahref="#method.add_sparse">add_sparse</a></li><li><ahref="#method.add_union">add_union</a></li><li><ahref="#method.add_union_reverse">add_union_reverse</a></li><li><ahref="#method.build">build</a></li><li><ahref="#method.clear">clear</a></li><li><ahref="#method.current_pattern_id">current_pattern_id</a></li><li><ahref="#method.finish_pattern">finish_pattern</a></li><li><ahref="#method.get_look_matcher">get_look_matcher</a></li><li><ahref="#method.get_reverse">get_reverse</a></li><li><ahref="#method.get_size_limit">get_size_limit</a></li><li><ahref="#method.get_utf8">get_utf8</a></li><li><ahref="#method.memory_usage">memory_usage</a></li><li><ahref="#method.new">new</a></li><li><ahref="#method.patch">patch</a></li><li><ahref="#method.pattern_len">pattern_len</a></li><li><ahref="#method.set_look_matcher">set_look_matcher</a></li><li><ahref="#method.set_reverse">set_reverse</a></li><li><ahref="#method.set_size_limit">set_size_limit</a></li><li><ahref="#method.set_utf8">set_utf8</a></li><li><ahref="#method.st
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../../regex_automata/all.html"title="show sidebar"></a></div><inputclass="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"><divid="help-button"tabindex="-1"><ahref="../../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Struct <ahref="../../index.html">regex_automata</a>::<wbr><ahref="../index.html">nfa</a>::<wbr><ahref="index.html">thompson</a>::<wbr><aclass="struct"href="#">Builder</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#313-357">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct Builder { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>An abstraction for building Thompson NFAs by hand.</p>
<p>A builder is what a <ahref="struct.Compiler.html"title="struct regex_automata::nfa::thompson::Compiler"><code>thompson::Compiler</code></a>
uses internally to translate a regex’s high-level intermediate
representation into an <ahref="struct.NFA.html"title="struct regex_automata::nfa::thompson::NFA"><code>NFA</code></a>.</p>
<p>The primary function of this builder is to abstract away the internal
representation of an NFA and make it difficult to produce NFAs are that
internally invalid or inconsistent. This builder also provides a way to
add “empty” states (which can be thought of as unconditional epsilon
transitions), despite the fact that <ahref="enum.State.html"title="enum regex_automata::nfa::thompson::State"><code>thompson::State</code></a> does
not have any “empty” representation. The advantage of “empty” states is
that they make the code for constructing a Thompson NFA logically simpler.</p>
<p>Many of the routines on this builder may panic or return errors. Generally
speaking, panics occur when an invalid sequence of method calls were made,
where as an error occurs if things get too big. (Where “too big” might mean
exhausting identifier space or using up too much heap memory in accordance
with the configured <ahref="struct.Builder.html#method.set_size_limit"title="method regex_automata::nfa::thompson::Builder::set_size_limit"><code>size_limit</code></a>.)</p>
<p>Each pattern you add to an NFA should correspond to a pair of
<ahref="struct.Builder.html#method.start_pattern"title="method regex_automata::nfa::thompson::Builder::start_pattern"><code>Builder::start_pattern</code></a> and <ahref="struct.Builder.html#method.finish_pattern"title="method regex_automata::nfa::thompson::Builder::finish_pattern"><code>Builder::finish_pattern</code></a> calls, with
calls inbetween that add NFA states for that pattern. NFA states may be
added without first calling <code>start_pattern</code>, with the exception of adding
<p>Here is a very brief overview of each of the methods that add NFA states.
Every method adds a single state.</p>
<ul>
<li><ahref="struct.Builder.html#method.add_empty"title="method regex_automata::nfa::thompson::Builder::add_empty"><code>add_empty</code></a>: Add a state with a single
unconditional epsilon transition to another state.</li>
<li><ahref="struct.Builder.html#method.add_union"title="method regex_automata::nfa::thompson::Builder::add_union"><code>add_union</code></a>: Adds a state with unconditional
epsilon transitions to two or more states, with earlier transitions
preferred over later ones.</li>
<li><ahref="struct.Builder.html#method.add_union_reverse"title="method regex_automata::nfa::thompson::Builder::add_union_reverse"><code>add_union_reverse</code></a>: Adds a state with
unconditional epsilon transitions to two or more states, with later
transitions preferred over earlier ones.</li>
<li><ahref="struct.Builder.html#method.add_range"title="method regex_automata::nfa::thompson::Builder::add_range"><code>add_range</code></a>: Adds a state with a single transition
to another state that can only be followed if the current input byte is
within the range given.</li>
<li><ahref="struct.Builder.html#method.add_sparse"title="method regex_automata::nfa::thompson::Builder::add_sparse"><code>add_sparse</code></a>: Adds a state with two or more
range transitions to other states, where a transition is only followed
if the current input byte is within one of the ranges. All transitions
in this state have equal priority, and the corresponding ranges must be
non-overlapping.</li>
<li><ahref="struct.Builder.html#method.add_look"title="method regex_automata::nfa::thompson::Builder::add_look"><code>add_look</code></a>: Adds a state with a single <em>conditional</em>
epsilon transition to another state, where the condition depends on a
limited look-around property.</li>
<li><ahref="struct.Builder.html#method.add_capture_start"title="method regex_automata::nfa::thompson::Builder::add_capture_start"><code>add_capture_start</code></a>: Adds a state with
a single unconditional epsilon transition that also instructs an NFA
simulation to record the current input position to a specific location in
memory. This is intended to represent the starting location of a capturing
group.</li>
<li><ahref="struct.Builder.html#method.add_capture_end"title="method regex_automata::nfa::thompson::Builder::add_capture_end"><code>add_capture_end</code></a>: Adds a state with
a single unconditional epsilon transition that also instructs an NFA
simulation to record the current input position to a specific location in
memory. This is intended to represent the ending location of a capturing
group.</li>
<li><ahref="struct.Builder.html#method.add_fail"title="method regex_automata::nfa::thompson::Builder::add_fail"><code>add_fail</code></a>: Adds a state that never transitions to
another state.</li>
<li><ahref="struct.Builder.html#method.add_match"title="method regex_automata::nfa::thompson::Builder::add_match"><code>add_match</code></a>: Add a state that indicates a match has
been found for a particular pattern. A match state is a final state with
no outgoing transitions.</li>
</ul>
<h3id="setting-transitions-between-nfa-states"><ahref="#setting-transitions-between-nfa-states">Setting transitions between NFA states</a></h3>
<p>The <ahref="struct.Builder.html#method.patch"title="method regex_automata::nfa::thompson::Builder::patch"><code>Builder::patch</code></a> method creates a transition from one state to the
next. If the <code>from</code> state corresponds to a state that supports multiple
outgoing transitions (such as “union”), then this adds the corresponding
transition. Otherwise, it sets the single transition. (This routine panics
if <code>from</code> corresponds to a state added by <code>add_sparse</code>, since sparse states
) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="struct.NFA.html"title="struct regex_automata::nfa::thompson::NFA">NFA</a>, <aclass="struct"href="struct.BuildError.html"title="struct regex_automata::nfa::thompson::BuildError">BuildError</a>></h4></section></summary><divclass="docblock"><p>Assemble a <ahref="struct.NFA.html"title="struct regex_automata::nfa::thompson::NFA"><code>NFA</code></a> from the states added so far.</p>
<p>After building an NFA, more states may be added and <code>build</code> may be
called again. To reuse a builder to produce an entirely new NFA from
scratch, call the <ahref="struct.Builder.html#method.clear"title="method regex_automata::nfa::thompson::Builder::clear"><code>clear</code></a> method first.</p>
<p><code>start_anchored</code> refers to the ID of the starting state that anchored
searches should use. That is, searches who matches are limited to the
starting position of the search.</p>
<p><code>start_unanchored</code> refers to the ID of the starting state that
unanchored searches should use. This permits searches to report matches
that start after the beginning of the search. In cases where unanchored
searches are not supported, the unanchored starting state ID must be
the same as the anchored starting state ID.</p>
<h5id="errors"><ahref="#errors">Errors</a></h5>
<p>This returns an error if there was a problem producing the final NFA.
In particular, this might include an error if the capturing groups
added to this builder violate any of the invariants documented on
<p>If <code>start_pattern</code> was called, then <code>finish_pattern</code> must be called
before <code>build</code>, otherwise this panics.</p>
<p>This may panic for other invalid uses of a builder. For example, if
a “start capture” state was added without a corresponding “end capture”
state.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.start_pattern"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#622-632">source</a><h4class="code-header">pub fn <ahref="#method.start_pattern"class="fn">start_pattern</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../struct.PatternID.html"title="struct regex_automata::PatternID">PatternID</a>, <aclass="struct"href="struct.BuildError.html"title="struct regex_automata::nfa::thompson::BuildError">BuildError</a>></h4></section></summary><divclass="docblock"><p>Start the assembly of a pattern in this NFA.</p>
<p>Upon success, this returns the identifier for the new pattern.
Identifiers start at <code>0</code> and are incremented by 1 for each new pattern.</p>
<p>It is necessary to call this routine before adding capturing states.
Otherwise, any other NFA state may be added before starting a pattern.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../struct.PatternID.html"title="struct regex_automata::PatternID">PatternID</a>, <aclass="struct"href="struct.BuildError.html"title="struct regex_automata::nfa::thompson::BuildError">BuildError</a>></h4></section></summary><divclass="docblock"><p>Finish the assembly of a pattern in this NFA.</p>
<p>Upon success, this returns the identifier for the new pattern.
Identifiers start at <code>0</code> and are incremented by 1 for each new
pattern. This is the same identifier returned by the corresponding
<code>start_pattern</code> call.</p>
<p>Note that <code>start_pattern</code> and <code>finish_pattern</code> pairs cannot be
interleaved or nested. A correct <code>finish_pattern</code> call <em>always</em>
corresponds to the most recently called <code>start_pattern</code> routine.</p>
<p>If this is called without a corresponding <code>start_pattern</code> call, then
this panics.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.current_pattern_id"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#669-671">source</a><h4class="code-header">pub fn <ahref="#method.current_pattern_id"class="fn">current_pattern_id</a>(&self) -><aclass="struct"href="../../struct.PatternID.html"title="struct regex_automata::PatternID">PatternID</a></h4></section></summary><divclass="docblock"><p>Returns the pattern identifier of the current pattern.</p>
<p>If this doesn’t occur after a <code>start_pattern</code> call and before the
corresponding <code>finish_pattern</code> call, then this panics.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.pattern_len"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#677-679">source</a><h4class="code-header">pub fn <ahref="#method.pattern_len"class="fn">pattern_len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the number of patterns added to this builder so far.</p>
<p>This only includes patterns that have had <code>finish_pattern</code> called
<p>An “empty” NFA state is a state with a single unconditional epsilon
transition to another NFA state. Such empty states are removed before
building the final <ahref="struct.NFA.html"title="struct regex_automata::nfa::thompson::NFA"><code>NFA</code></a> (which has no such “empty” states), but they
can be quite useful in the construction process of an NFA.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../util/primitives/struct.StateID.html"title="struct regex_automata::util::primitives::StateID">StateID</a>, <aclass="struct"href="struct.BuildError.html"title="struct regex_automata::nfa::thompson::BuildError">BuildError</a>></h4></section></summary><divclass="docblock"><p>Add a “look” NFA state.</p>
<p>A “look” NFA state corresponds to a state with exactly one
<em>conditional</em> epsilon transition to another NFA state. Namely, it
represents one of a small set of simplistic look-around operators.</p>
<p>Callers may provide a “dummy” state ID (typically <ahref="../../util/primitives/struct.StateID.html#associatedconstant.ZERO"title="associated constant regex_automata::util::primitives::StateID::ZERO"><code>StateID::ZERO</code></a>),
and then change it later with <ahref="struct.Builder.html#method.patch"title="method regex_automata::nfa::thompson::Builder::patch"><code>patch</code></a>.</p>
<p>A “start capture” NFA state corresponds to a state with exactly one
outgoing unconditional epsilon transition to another state. Unlike
“empty” states, a “start capture” state also carries with it an
instruction for saving the current position of input to a particular
location in memory. NFA simulations, like the Pike VM, may use this
information to report the match locations of capturing groups in a
regex pattern.</p>
<p>If the corresponding capturing group has a name, then callers should
include it here.</p>
<p>Callers may provide a “dummy” state ID (typically <ahref="../../util/primitives/struct.StateID.html#associatedconstant.ZERO"title="associated constant regex_automata::util::primitives::StateID::ZERO"><code>StateID::ZERO</code></a>),
and then change it later with <ahref="struct.Builder.html#method.patch"title="method regex_automata::nfa::thompson::Builder::patch"><code>patch</code></a>.</p>
<p>Note that unlike <code>start_pattern</code>/<code>finish_pattern</code>, capturing start and
end states may be interleaved. Indeed, it is typical for many “start
capture” NFA states to appear before the first “end capture” state.</p>
<p>This returns an error if the state identifier space is exhausted, or if
the configured heap size limit has been exceeded or if the given
capture index overflows <code>usize</code>.</p>
<p>While the above are the only conditions in which this routine can
currently return an error, it is possible to call this method with an
inputs that results in the final <code>build()</code> step failing to produce an
NFA. For example, if one adds two distinct capturing groups with the
same name, then that will result in <code>build()</code> failing with an error.</p>
<p>See the <ahref="../../util/captures/struct.GroupInfo.html"title="struct regex_automata::util::captures::GroupInfo"><code>GroupInfo</code></a> type for
more information on what qualifies as valid capturing groups.</p>
<p>A “end capture” NFA state corresponds to a state with exactly one
outgoing unconditional epsilon transition to another state. Unlike
“empty” states, a “end capture” state also carries with it an
instruction for saving the current position of input to a particular
location in memory. NFA simulations, like the Pike VM, may use this
information to report the match locations of capturing groups in a</p>
<p>Callers may provide a “dummy” state ID (typically <ahref="../../util/primitives/struct.StateID.html#associatedconstant.ZERO"title="associated constant regex_automata::util::primitives::StateID::ZERO"><code>StateID::ZERO</code></a>),
and then change it later with <ahref="struct.Builder.html#method.patch"title="method regex_automata::nfa::thompson::Builder::patch"><code>patch</code></a>.</p>
<p>Note that unlike <code>start_pattern</code>/<code>finish_pattern</code>, capturing start and
end states may be interleaved. Indeed, it is typical for many “start
capture” NFA states to appear before the first “end capture” state.</p>
<p>This returns an error if the state identifier space is exhausted, or if
the configured heap size limit has been exceeded or if the given
capture index overflows <code>usize</code>.</p>
<p>While the above are the only conditions in which this routine can
currently return an error, it is possible to call this method with an
inputs that results in the final <code>build()</code> step failing to produce an
NFA. For example, if one adds two distinct capturing groups with the
same name, then that will result in <code>build()</code> failing with an error.</p>
<p>See the <ahref="../../util/captures/struct.GroupInfo.html"title="struct regex_automata::util::captures::GroupInfo"><code>GroupInfo</code></a> type for
more information on what qualifies as valid capturing groups.</p>
<p>This must be called after a <code>start_pattern</code> call but before the
corresponding <code>finish_pattern</code> call. Otherwise, it panics.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.patch"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1143-1183">source</a><h4class="code-header">pub fn <ahref="#method.patch"class="fn">patch</a>(&mut self, from: <aclass="struct"href="../../util/primitives/struct.StateID.html"title="struct regex_automata::util::primitives::StateID">StateID</a>, to: <aclass="struct"href="../../util/primitives/struct.StateID.html"title="struct regex_automata::util::primitives::StateID">StateID</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.BuildError.html"title="struct regex_automata::nfa::thompson::BuildError">BuildError</a>></h4></section></summary><divclass="docblock"><p>Add a transition from one state to another.</p>
<p>This routine is called “patch” since it is very common to add the
states you want, typically with “dummy” state ID transitions, and then
“patch” in the real state IDs later. This is because you don’t always
know all of the necessary state IDs to add because they might not
<p>This panics if <code>from</code> corresponds to a “sparse” state. When “sparse”
states are added, there is no way to patch them after-the-fact. (If you
have a use case where this would be helpful, please file an issue. It
will likely require a new API.)</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_utf8"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1219-1221">source</a><h4class="code-header">pub fn <ahref="#method.set_utf8"class="fn">set_utf8</a>(&mut self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>)</h4></section></summary><divclass="docblock"><p>Set whether the NFA produced by this builder should only match UTF-8.</p>
<p>This should be set when both of the following are true:</p>
<ol>
<li>The caller guarantees that the NFA created by this build will only
report non-empty matches with spans that are valid UTF-8.</li>
<li>The caller desires regex engines using this NFA to avoid reporting
empty matches with a span that splits a valid UTF-8 encoded codepoint.</li>
</ol>
<p>Property (1) is not checked. Instead, this requires the caller to
promise that it is true. Property (2) corresponds to the behavior of
regex engines using the NFA created by this builder. Namely, there
is no way in the NFA’s graph itself to say that empty matches found
by, for example, the regex <code>a*</code> will fall on valid UTF-8 boundaries.
Instead, this option is used to communicate the UTF-8 semantic to regex
engines that will typically implement it as a post-processing step by
filtering out empty matches that don’t fall on UTF-8 boundaries.</p>
<p>If you’re building an NFA from an HIR (and not using a
<ahref="struct.Compiler.html"title="struct regex_automata::nfa::thompson::Compiler"><code>thompson::Compiler</code></a>), then you can
use the <ahref="../../util/syntax/struct.Config.html#method.utf8"title="method regex_automata::util::syntax::Config::utf8"><code>syntax::Config::utf8</code></a>
option to guarantee that if the HIR detects a non-empty match, then it
is guaranteed to be valid UTF-8.</p>
<p>Note that property (2) does <em>not</em> specify the behavior of executing
a search on a haystack that is not valid UTF-8. Therefore, if you’re
<em>not</em> running this NFA on strings that are guaranteed to be valid
UTF-8, you almost certainly do not want to enable this option.
Similarly, if you are running the NFA on strings that <em>are</em> guaranteed
to be valid UTF-8, then you almost certainly want to enable this option
unless you can guarantee that your NFA will never produce a zero-width
match.</p>
<p>It is disabled by default.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_utf8"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1226-1228">source</a><h4class="code-header">pub fn <ahref="#method.get_utf8"class="fn">get_utf8</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns whether UTF-8 mode is enabled for this builder.</p>
<p>See <ahref="struct.Builder.html#method.set_utf8"title="method regex_automata::nfa::thompson::Builder::set_utf8"><code>Builder::set_utf8</code></a> for more details about what “UTF-8 mode” is.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_reverse"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1239-1241">source</a><h4class="code-header">pub fn <ahref="#method.set_reverse"class="fn">set_reverse</a>(&mut self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>)</h4></section></summary><divclass="docblock"><p>Sets whether the NFA produced by this builder should be matched in
reverse or not. Generally speaking, when enabled, the NFA produced
should be matched by moving backwards through a haystack, from a higher
memory address to a lower memory address.</p>
<p>See also <ahref="struct.NFA.html#method.is_reverse"title="method regex_automata::nfa::thompson::NFA::is_reverse"><code>NFA::is_reverse</code></a> for more details.</p>
<p>This is disabled by default, which means NFAs are by default matched
in the forward direction.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_reverse"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1247-1249">source</a><h4class="code-header">pub fn <ahref="#method.get_reverse"class="fn">get_reverse</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns whether reverse mode is enabled for this builder.</p>
<p>See <ahref="struct.Builder.html#method.set_reverse"title="method regex_automata::nfa::thompson::Builder::set_reverse"><code>Builder::set_reverse</code></a> for more details about what “reverse mode”
is.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_look_matcher"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1257-1259">source</a><h4class="code-header">pub fn <ahref="#method.set_look_matcher"class="fn">set_look_matcher</a>(&mut self, m: <aclass="struct"href="../../util/look/struct.LookMatcher.html"title="struct regex_automata::util::look::LookMatcher">LookMatcher</a>)</h4></section></summary><divclass="docblock"><p>Sets the look-around matcher that should be used for the resulting NFA.</p>
<p>A look-around matcher can be used to configure how look-around
assertions are matched. For example, a matcher might carry
configuration that changes the line terminator used for <code>(?m:^)</code> and
<code>(?m:$)</code> assertions.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_look_matcher"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1265-1267">source</a><h4class="code-header">pub fn <ahref="#method.get_look_matcher"class="fn">get_look_matcher</a>(&self) ->&<aclass="struct"href="../../util/look/struct.LookMatcher.html"title="struct regex_automata::util::look::LookMatcher">LookMatcher</a></h4></section></summary><divclass="docblock"><p>Returns the look-around matcher used for this builder.</p>
<p>If a matcher was not explicitly set, then <code>LookMatcher::default()</code> is
returned.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_size_limit"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1276-1282">source</a><h4class="code-header">pub fn <ahref="#method.set_size_limit"class="fn">set_size_limit</a>(&mut self, limit: <aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.unit.html">()</a>, <aclass="struct"href="struct.BuildError.html"title="struct regex_automata::nfa::thompson::BuildError">BuildError</a>></h4></section></summary><divclass="docblock"><p>Set the size limit on this builder.</p>
<p>Setting the size limit will also check whether the NFA built so far
fits within the given size limit. If it doesn’t, then an error is
returned.</p>
<p>By default, there is no configured size limit.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_size_limit"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1288-1290">source</a><h4class="code-header">pub fn <ahref="#method.get_size_limit"class="fn">get_size_limit</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>></h4></section></summary><divclass="docblock"><p>Return the currently configured size limit.</p>
<p>By default, this returns <code>None</code>, which corresponds to no configured
size limit.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.memory_usage"class="method"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#1299-1301">source</a><h4class="code-header">pub fn <ahref="#method.memory_usage"class="fn">memory_usage</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Returns the heap memory usage, in bytes, used by the NFA states added
so far.</p>
<p>Note that this is an approximation of how big the final NFA will be.
In practice, the final NFA will likely be a bit smaller because of
its simpler state representation. (For example, using things like
<code>Box<[StateID]></code> instead of <code>Vec<StateID></code>.)</p>
</div></details></div></details></div><h2id="trait-implementations"class="section-header">Trait Implementations<ahref="#trait-implementations"class="anchor">§</a></h2><divid="trait-implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Clone-for-Builder"class="impl"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#312">source</a><ahref="#impl-Clone-for-Builder"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> for <aclass="struct"href="struct.Builder.html"title="struct regex_automata::nfa::thompson::Builder">Builder</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone"class="method trait-impl"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#312">source</a><ahref="#method.clone"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#tymethod.clone"class="fn">clone</a>(&self) -><aclass="struct"href="struct.Builder.html"title="struct regex_automata::nfa::thompson::Builder">Builder</a></h4></section></summary><divclass='docblock'>Returns a copy of the value. <ahref="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_from"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.76.0/src/core/clone.rs.html#169">source</a></span><ahref="#method.clone_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#method.clone_from"class="fn">clone_from</a>(&mut self, source: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><divclass='docblock'>Performs copy-assignment from <code>source</code>. <ahref="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Debug-for-Builder"class="impl"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#312">source</a><ahref="#impl-Debug-for-Builder"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="struct.Builder.html"title="struct regex_automata::nfa::thompson::Builder">Builder</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt"class="method trait-impl"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#312">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.76.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.76.0/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></h4></section></summary><divclass='docblock'>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Default-for-Builder"class="impl"><aclass="src rightside"href="../../../src/regex_automata/nfa/thompson/builder.rs.html#312">source</a><ahref="#impl-Default-for-Builder"class=
T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.type_id"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#141">source</a><ahref="#method.type_id"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id"class="fn">type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.76.0/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></h4></section></summary><divclass='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Borrow%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#208">source</a><ahref="#impl-Borrow%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#210">source</a><ahref="#method.borrow"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow"class="fn">borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a></h4></section></summary><divclass='docblock'>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-BorrowMut%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#216">source</a><ahref="#impl-BorrowMut%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow_mut"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#217">source</a><ahref="#method.borrow_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut"class="fn">borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut T</a></h4></section></summary><divclass='docblock'>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-From%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#763">source</a><ahref="#impl-From%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#766">source</a><ahref="#method.from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(t: T) -> T</h4></section></summary><divclass="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Into%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#747-749">source</a><ahref="#impl-Into%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T<divclass="where">where
<p>That is, this conversion is whatever the implementation of
<code><ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToOwned-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#83-85">source</a><ahref="#impl-ToOwned-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Owned"class="associatedtype trait-impl"><ahref="#associatedtype.Owned"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="associatedtype">Owned</a> = T</h4></section></summary><divclass='docblock'>The resulting type after obtaining ownership.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_owned"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#88">source</a><ahref="#method.to_owned"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fn">to_owned</a>(&self) -> T</h4></section></summary><divclass='docblock'>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#92">source</a><ahref="#method.clone_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fn">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><divclass='docblock'>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#803-805">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#810">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#788-790">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#795">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>