<!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="The parameters for a regex search including the haystack to search."><title>Input in regex_automata - 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-5bc39a1768837dd0.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.77.0 (aedd173a2 2024-03-17)"data-channel="1.77.0"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-04d5337699b92874.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"title="show sidebar"></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="#">Input</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.anchored">anchored</a></li><li><ahref="#method.earliest">earliest</a></li><li><ahref="#method.end">end</a></li><li><ahref="#method.get_anchored">get_anchored</a></li><li><ahref="#method.get_earliest">get_earliest</a></li><li><ahref="#method.get_range">get_range</a></li><li><ahref="#method.get_span">get_span</a></li><li><ahref="#method.haystack">haystack</a></li><li><ahref="#method.is_char_boundary">is_char_boundary</a></li><li><ahref="#method.is_done">is_done</a></li><li><ahref="#method.new">new</a></li><li><ahref="#method.range">range</a></li><li><ahref="#method.set_anchored">set_anchored</a></li><li><ahref="#method.set_earliest">set_earliest</a></li><li><ahref="#method.set_end">set_end</a></li><li><ahref="#method.set_range">set_range</a></li><li><ahref="#method.set_span">set_span</a></li><li><ahref="#method.set_start">set_start</a></li><li><ahref="#method.span">span</a></li><li><ahref="#method.start">start</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block trait-implementation"><li><ahref="#impl-Clone-for-Input%3C'h%3E">Clone</a></li><li><ahref="#impl-Debug-for-Input%3C'h%3E">Debug</a></li><li><ahref="#impl-From%3C%26H%3E-for-Input%3C'h%3E">From<&'h H></a></li></ul><h3><ahref="#synthetic-implementations">Auto Trait Implementations</a></h3><ulclass="block synthetic-implementation"><li><ahref="#impl-RefUnwindSafe-for-Input%3C'h%3E">RefUnwindSafe</a></li><li><ahref="#impl-S
<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><aclass="struct"href="#">Input</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/util/search.rs.html#102-107">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct Input<'h> { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>The parameters for a regex search including the haystack to search.</p>
<p>It turns out that regex searches have a few parameters, and in most cases,
those parameters have defaults that work in the vast majority of cases.
This <code>Input</code> type exists to make that common case seamnless while also
providing an avenue for changing the parameters of a search. In particular,
this type enables doing so without a combinatorial explosion of different
methods and/or superfluous parameters in the common cases.</p>
<p>An <code>Input</code> permits configuring the following things:</p>
<ul>
<li>Search only a substring of a haystack, while taking the broader context
into account for resolving look-around assertions.</li>
<li>Indicating whether to search for all patterns in a regex, or to
only search for one pattern in particular.</li>
<li>Whether to perform an anchored on unanchored search.</li>
<li>Whether to report a match as early as possible.</li>
</ul>
<p>All of these parameters, except for the haystack, have sensible default
values. This means that the minimal search configuration is simply a call
to <ahref="struct.Input.html#method.new"title="associated function regex_automata::Input::new"><code>Input::new</code></a> with your haystack. Setting any other parameter is
optional.</p>
<p>Moreover, for any <code>H</code> that implements <code>AsRef<[u8]></code>, there exists a
<code>From<H> for Input</code> implementation. This is useful because many of the
search APIs in this crate accept an <code>Into<Input></code>. This means you can
provide string or byte strings to these routines directly, and they’ll
automatically get converted into an <code>Input</code> for you.</p>
<p>The lifetime parameter <code>'h</code> refers to the lifetime of the haystack.</p>
<p>The API of <code>Input</code> is split into a few different parts:</p>
<ul>
<li>A builder-like API that transforms a <code>Input</code> by value. Examples:
<ahref="struct.Input.html#method.span"title="method regex_automata::Input::span"><code>Input::span</code></a> and <ahref="struct.Input.html#method.anchored"title="method regex_automata::Input::anchored"><code>Input::anchored</code></a>.</li>
<li>A setter API that permits mutating parameters in place. Examples:
<ahref="struct.Input.html#method.set_span"title="method regex_automata::Input::set_span"><code>Input::set_span</code></a> and <ahref="struct.Input.html#method.set_anchored"title="method regex_automata::Input::set_anchored"><code>Input::set_anchored</code></a>.</li>
<li>A getter API that permits retrieving any of the search parameters.
Examples: <ahref="struct.Input.html#method.get_span"title="method regex_automata::Input::get_span"><code>Input::get_span</code></a> and <ahref="struct.Input.html#method.get_anchored"title="method regex_automata::Input::get_anchored"><code>Input::get_anchored</code></a>.</li>
<li>A few convenience getter routines that don’t conform to the above naming
pattern due to how common they are. Examples: <ahref="struct.Input.html#method.haystack"title="method regex_automata::Input::haystack"><code>Input::haystack</code></a>,
<ahref="struct.Input.html#method.start"title="method regex_automata::Input::start"><code>Input::start</code></a> and <ahref="struct.Input.html#method.end"title="method regex_automata::Input::end"><code>Input::end</code></a>.</li>
<li>Miscellaneous predicates and other helper routines that are useful
in some contexts. Examples: <ahref="struct.Input.html#method.is_char_boundary"title="method regex_automata::Input::is_char_boundary"><code>Input::is_char_boundary</code></a>.</li>
</ul>
<p>A <code>Input</code> exposes so much because it is meant to be used by both callers of
regex engines <em>and</em> implementors of regex engines. A constraining factor is
that regex engines should accept a <code>&Input</code> as its lowest level API, which
means that implementors should only use the “getter” APIs of a <code>Input</code>.</p>
<h2id="valid-bounds-and-search-termination"><aclass="doc-anchor"href="#valid-bounds-and-search-termination">§</a>Valid bounds and search termination</h2>
<p>An <code>Input</code> permits setting the bounds of a search via either
<ahref="struct.Input.html#method.span"title="method regex_automata::Input::span"><code>Input::span</code></a> or <ahref="struct.Input.html#method.range"title="method regex_automata::Input::range"><code>Input::range</code></a>. The bounds set must be valid, or
else a panic will occur. Bounds are valid if and only if:</p>
<ul>
<li>The bounds represent a valid range into the input’s haystack.</li>
<li><strong>or</strong> the end bound is a valid ending bound for the haystack <em>and</em>
the start bound is exactly one greater than the start bound.</li>
</ul>
<p>In the latter case, <ahref="struct.Input.html#method.is_done"title="method regex_automata::Input::is_done"><code>Input::is_done</code></a> will return true and indicates any
search receiving such an input should immediately return with no match.</p>
<p>Note that while <code>Input</code> is used for reverse searches in this crate, the
<code>Input::is_done</code> predicate assumes a forward search. Because unsigned
offsets are used internally, there is no way to tell from only the offsets
</div></details><h2id="implementations"class="section-header">Implementations<ahref="#implementations"class="anchor">§</a></h2><divid="implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Input%3C'h%3E"class="impl"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#109-770">source</a><ahref="#impl-Input%3C'h%3E"class="anchor">§</a><h3class="code-header">impl<'h><aclass="struct"href="struct.Input.html"title="struct regex_automata::Input">Input</a><'h></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.new"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#112-124">source</a><h4class="code-header">pub fn <ahref="#method.new"class="fn">new</a><H: ?<aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a> + <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>>(haystack: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'h H</a>) -><aclass="struct"href="struct.Input.html"title="struct regex_automata::Input">Input</a><'h></h4></section></summary><divclass="docblock"><p>Create a new search configuration for the given haystack.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.span"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#206-209">source</a><h4class="code-header">pub fn <ahref="#method.span"class="fn">span</a><S: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="struct.Span.html"title="struct regex_automata::Span">Span</a>>>(self, span: S) -><aclass="struct"href="struct.Input.html"title="struct regex_automata::Input">Input</a><'h></h4></section></summary><divclass="docblock"><p>Set the span for this search.</p>
<p>This routine does not panic if the span given is not a valid range for
this search’s haystack. If this search is run with an invalid range,
then the most likely outcome is that the actual search execution will
panic.</p>
<p>This routine is generic over how a span is provided. While
a <ahref="struct.Span.html"title="struct regex_automata::Span"><code>Span</code></a> may be given directly, one may also provide a
<code>std::ops::Range<usize></code>. To provide anything supported by range
syntax, use the <ahref="struct.Input.html#method.range"title="method regex_automata::Input::range"><code>Input::range</code></a> method.</p>
<p>The default span is the entire haystack.</p>
<p>Note that <ahref="struct.Input.html#method.range"title="method regex_automata::Input::range"><code>Input::range</code></a> overrides this method and vice versa.</p>
<p>This routine does not panic if the range given is not a valid range for
this search’s haystack. If this search is run with an invalid range,
then the most likely outcome is that the actual search execution will
panic.</p>
<p>The default range is the entire haystack.</p>
<p>Note that <ahref="struct.Input.html#method.span"title="method regex_automata::Input::span"><code>Input::span</code></a> overrides this method and vice versa.</p>
to a valid <ahref="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html"title="struct core::ops::range::Range"><code>Range</code></a>. For example, this would panic when given
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.anchored"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#342-345">source</a><h4class="code-header">pub fn <ahref="#method.anchored"class="fn">anchored</a>(self, mode: <aclass="enum"href="enum.Anchored.html"title="enum regex_automata::Anchored">Anchored</a>) -><aclass="struct"href="struct.Input.html"title="struct regex_automata::Input">Input</a><'h></h4></section></summary><divclass="docblock"><p>Sets the anchor mode of a search.</p>
<p>When a search is anchored (so that’s <ahref="enum.Anchored.html#variant.Yes"title="variant regex_automata::Anchored::Yes"><code>Anchored::Yes</code></a> or
<ahref="enum.Anchored.html#variant.Pattern"title="variant regex_automata::Anchored::Pattern"><code>Anchored::Pattern</code></a>), a match must begin at the start of a search.
When a search is not anchored (that’s <ahref="enum.Anchored.html#variant.No"title="variant regex_automata::Anchored::No"><code>Anchored::No</code></a>), regex engines
will behave as if the pattern started with a <code>(?s-u:.)*?</code>. This prefix
permits a match to appear anywhere.</p>
<p>By default, the anchored mode is <ahref="enum.Anchored.html#variant.No"title="variant regex_automata::Anchored::No"><code>Anchored::No</code></a>.</p>
<p><strong>WARNING:</strong> this is subtly different than using a <code>^</code> at the start of
your regex. A <code>^</code> forces a regex to match exclusively at the start of
a haystack, regardless of where you begin your search. In contrast,
anchoring a search will allow your regex to match anywhere in your
haystack, but the match must start at the beginning of a search.</p>
<p>For example, consider the haystack <code>aba</code> and the following searches:</p>
<ol>
<li>The regex <code>^a</code> is compiled with <code>Anchored::No</code> and searches <code>aba</code>
starting at position <code>2</code>. Since <code>^</code> requires the match to start at
the beginning of the haystack and <code>2 > 0</code>, no match is found.</li>
<li>The regex <code>a</code> is compiled with <code>Anchored::Yes</code> and searches <code>aba</code>
starting at position <code>2</code>. This reports a match at <code>[2, 3]</code> since
the match starts where the search started. Since there is no <code>^</code>,
there is no requirement for the match to start at the beginning of
the haystack.</li>
<li>The regex <code>a</code> is compiled with <code>Anchored::Yes</code> and searches <code>aba</code>
starting at position <code>1</code>. Since <code>b</code> corresponds to position <code>1</code> and
since the search is anchored, it finds no match. While the regex
matches at other positions, configuring the search to be anchored
requires that it only report a match that begins at the same offset
as the beginning of the search.</li>
<li>The regex <code>a</code> is compiled with <code>Anchored::No</code> and searches <code>aba</code>
starting at position <code>1</code>. Since the search is not anchored and
the regex does not start with <code>^</code>, the search executes as if there
is a <code>(?s:.)*?</code> prefix that permits it to match anywhere. Thus, it
reports a match at <code>[2, 3]</code>.</li>
</ol>
<p>Note that the <ahref="enum.Anchored.html#variant.Pattern"title="variant regex_automata::Anchored::Pattern"><code>Anchored::Pattern</code></a> mode is like <code>Anchored::Yes</code>,
except it only reports matches for a particular pattern.</p>
<p>This is like the <ahref="struct.Input.html#method.span"title="method regex_automata::Input::span"><code>Input::span</code></a> method, except this mutates the
span in place.</p>
<p>This routine is generic over how a span is provided. While
a <ahref="struct.Span.html"title="struct regex_automata::Span"><code>Span</code></a> may be given directly, one may also provide a
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_range"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#467-486">source</a><h4class="code-header">pub fn <ahref="#method.set_range"class="fn">set_range</a><R: <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds">RangeBounds</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>>(&mut self, range: R)</h4></section></summary><divclass="docblock"><p>Set the span for this search configuration given any range.</p>
<p>This is like the <ahref="struct.Input.html#method.range"title="method regex_automata::Input::range"><code>Input::range</code></a> method, except this mutates the
span in place.</p>
<p>This routine does not panic if the range given is not a valid range for
this search’s haystack. If this search is run with an invalid range,
then the most likely outcome is that the actual search execution will
to a valid <ahref="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html"title="struct core::ops::range::Range"><code>Range</code></a>. For example, this would panic when given
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_start"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#510-512">source</a><h4class="code-header">pub fn <ahref="#method.set_start"class="fn">set_start</a>(&mut self, start: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Set the starting offset for the span for this search configuration.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_end"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#536-538">source</a><h4class="code-header">pub fn <ahref="#method.set_end"class="fn">set_end</a>(&mut self, end: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><divclass="docblock"><p>Set the ending offset for the span for this search configuration.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_anchored"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#558-560">source</a><h4class="code-header">pub fn <ahref="#method.set_anchored"class="fn">set_anchored</a>(&mut self, mode: <aclass="enum"href="enum.Anchored.html"title="enum regex_automata::Anchored">Anchored</a>)</h4></section></summary><divclass="docblock"><p>Set the anchor mode of a search.</p>
<p>This is like <ahref="struct.Input.html#method.anchored"title="method regex_automata::Input::anchored"><code>Input::anchored</code></a>, except it mutates the search
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_earliest"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#578-580">source</a><h4class="code-header">pub fn <ahref="#method.set_earliest"class="fn">set_earliest</a>(&mut self, yes: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>)</h4></section></summary><divclass="docblock"><p>Set whether the search should execute in “earliest” mode or not.</p>
<p>This is like <ahref="struct.Input.html#method.earliest"title="method regex_automata::Input::earliest"><code>Input::earliest</code></a>, except it mutates the search
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.haystack"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#593-595">source</a><h4class="code-header">pub fn <ahref="#method.haystack"class="fn">haystack</a>(&self) ->&[<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <ahref="#"class="tooltip"data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><divclass="docblock"><p>Return a borrow of the underlying haystack as a slice of bytes.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.start"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#617-619">source</a><h4class="code-header">pub fn <ahref="#method.start"class="fn">start</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Return the start position of this search.</p>
<p>This is a convenience routine for <code>search.get_span().start()</code>.</p>
<p>When <ahref="struct.Input.html#method.is_done"title="method regex_automata::Input::is_done"><code>Input::is_done</code></a> is <code>false</code>, this is guaranteed to return
an offset that is less than or equal to <ahref="struct.Input.html#method.end"title="method regex_automata::Input::end"><code>Input::end</code></a>. Otherwise,
the offset is one greater than <ahref="struct.Input.html#method.end"title="method regex_automata::Input::end"><code>Input::end</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.end"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#640-642">source</a><h4class="code-header">pub fn <ahref="#method.end"class="fn">end</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section></summary><divclass="docblock"><p>Return the end position of this search.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_span"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#661-663">source</a><h4class="code-header">pub fn <ahref="#method.get_span"class="fn">get_span</a>(&self) -><aclass="struct"href="struct.Span.html"title="struct regex_automata::Span">Span</a></h4></section></summary><divclass="docblock"><p>Return the span for this search configuration.</p>
<p>If one was not explicitly set, then the span corresponds to the entire
range of the haystack.</p>
<p>When <ahref="struct.Input.html#method.is_done"title="method regex_automata::Input::is_done"><code>Input::is_done</code></a> is <code>false</code>, the span returned is guaranteed
to correspond to valid bounds for this input’s haystack.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_range"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#682-684">source</a><h4class="code-header">pub fn <ahref="#method.get_range"class="fn">get_range</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html"title="struct core::ops::range::Range">Range</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></h4></section></summary><divclass="docblock"><p>Return the span as a range for this search configuration.</p>
<p>If one was not explicitly set, then the span corresponds to the entire
range of the haystack.</p>
<p>When <ahref="struct.Input.html#method.is_done"title="method regex_automata::Input::is_done"><code>Input::is_done</code></a> is <code>false</code>, the range returned is guaranteed
to correspond to valid bounds for this input’s haystack.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_anchored"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#703-705">source</a><h4class="code-header">pub fn <ahref="#method.get_anchored"class="fn">get_anchored</a>(&self) -><aclass="enum"href="enum.Anchored.html"title="enum regex_automata::Anchored">Anchored</a></h4></section></summary><divclass="docblock"><p>Return the anchored mode for this search configuration.</p>
<p>If no anchored mode was set, then it defaults to <ahref="enum.Anchored.html#variant.No"title="variant regex_automata::Anchored::No"><code>Anchored::No</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_earliest"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#718-720">source</a><h4class="code-header">pub fn <ahref="#method.get_earliest"class="fn">get_earliest</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Return whether this search should execute in “earliest” mode.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_done"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#741-743">source</a><h4class="code-header">pub fn <ahref="#method.is_done"class="fn">is_done</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Return true if and only if this search can never return any other
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_char_boundary"class="method"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#767-769">source</a><h4class="code-header">pub fn <ahref="#method.is_char_boundary"class="fn">is_char_boundary</a>(&self, offset: <aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns true if and only if the given offset in this search’s haystack
</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-Input%3C'h%3E"class="impl"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#101">source</a><ahref="#impl-Clone-for-Input%3C'h%3E"class="anchor">§</a><h3class="code-header">impl<'h><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> for <aclass="struct"href="struct.Input.html"title="struct regex_automata::Input">Input</a><'h></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/util/search.rs.html#101">source</a><ahref="#method.clone"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone"class="fn">clone</a>(&self) -><aclass="struct"href="struct.Input.html"title="struct regex_automata::Input">Input</a><'h></h4></section></summary><divclass='docblock'>Returns a copy of the value. <ahref="https://doc.rust-lang.org/1.77.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.77.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.77.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.77.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.77.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-Input%3C'h%3E"class="impl"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#772-783">source</a><ahref="#impl-Debug-for-Input%3C'h%3E"class="anchor">§</a><h3class="code-header">impl<'h><aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="struct.Input.html"title="struct regex_automata::Input">Input</a><'h></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/util/search.rs.html#773-782">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt"class="fn">fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a><'_>) -><aclass="type"href="https://doc.rust-lang.org/1.77.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.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-From%3C%26H%3E-for-Input%3C'h%3E"class="impl"><aclass="src rightside"href="../src/regex_automata/util/search.rs.html#785-789">source</a><ahref="#impl-From%3C%26H%3E-for-Input%3C'h%3E"class="anchor">§</a><h3class="
T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/1.77.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.77.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.77.0/core/any/trait.Any.html#tymethod.type_id"class="fn">type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.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.77.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.77.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.77.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.77.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.77.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.77.0/core/borrow/trait.Borrow.html#tymethod.borrow"class="fn">borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.0/src/core/convert/mod.rs.html#764">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.77.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-1"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><ahref="#method.from-1"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.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.77.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.77.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T<divclass="where">where
<code><ahref="https://doc.rust-lang.org/1.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.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.77.0/src/core/convert/mod.rs.html#804-806">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.77.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.77.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-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.77.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.77.0/src/core/convert/mod.rs.html#811">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.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.77.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.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.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.77.0/src/core/convert/mod.rs.html#789-791">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.77.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.77.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"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.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.77.0/src/core/convert/mod.rs.html#796">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.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.77.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.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><scripttype="text/json"id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>"}</script></section></div></main></body></html>