mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-24 04:00:40 +00:00
Automatic Travis documentation build
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
id="mainThemeStyle">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../dark.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
|
||||
<link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle">
|
||||
<script src="../../storage.js"></script>
|
||||
|
||||
|
||||
@@ -55,13 +55,11 @@
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content">
|
||||
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>regex</a>::<wbr><a href='index.html'>bytes</a>::<wbr><a class="struct" href=''>RegexSet</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>regex</a>::<wbr><a href='index.html'>bytes</a>::<wbr><a class="struct" href=''>RegexSet</a></span><span class='out-of-band'><span id='render-detail'>
|
||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||||
[<span class='inner'>−</span>]
|
||||
</a>
|
||||
</span><a class='srclink' href='../../src/regex/re_set.rs.html#86' title='goto source code'>[src]</a></span></h1>
|
||||
<pre class='rust struct'>pub struct RegexSet(_);</pre><div class='docblock'><p>Match multiple (possibly overlapping) regular expressions in a single scan.</p>
|
||||
</span><a class='srclink' href='../../src/regex/re_set.rs.html#86' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct RegexSet(_);</pre></div><div class='docblock'><p>Match multiple (possibly overlapping) regular expressions in a single scan.</p>
|
||||
<p>A regex set corresponds to the union of two or more regular expressions.
|
||||
That is, a regex set will match text where at least one of its
|
||||
constituent regular expressions matches. A regex set as its formulated here
|
||||
@@ -132,9 +130,7 @@ regex set and <code>n</code> is proportional to the length of the search text.</
|
||||
<h2 id='methods' class='small-section-header'>
|
||||
Methods<a href='#methods' class='anchor'></a>
|
||||
</h2>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><code>impl <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#88-219' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a><I, S>(exprs: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a>, <a class="enum" href="../../regex/enum.Error.html" title="enum regex::Error">Error</a>> <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>,<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = S>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#104-107' title='goto source code'>[src]</a></span></h4>
|
||||
<div class='docblock'><p>Create a new regex set with the given regular expressions.</p>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#88-219' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.new' class='fnname'>new</a><I, S>(exprs: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a>, <a class="enum" href="../../regex/enum.Error.html" title="enum regex::Error">Error</a>> <span class="where fmt-newline">where<br> S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>,<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = S>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#104-107' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a new regex set with the given regular expressions.</p>
|
||||
<p>This takes an iterator of <code>S</code>, where <code>S</code> is something that can produce
|
||||
a <code>&str</code>. If any of the strings in the iterator are not valid regular
|
||||
expressions, then an error is returned.</p>
|
||||
@@ -144,8 +140,7 @@ expressions, then an error is returned.</p>
|
||||
<pre class="rust rust-example-rendered">
|
||||
<span class="kw">let</span> <span class="ident">set</span> <span class="op">=</span> <span class="ident">RegexSet</span>::<span class="ident">new</span>(<span class="kw-2">&</span>[<span class="string">r"\w+"</span>, <span class="string">r"\d+"</span>]).<span class="ident">unwrap</span>();
|
||||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">set</span>.<span class="ident">is_match</span>(<span class="string">"foo"</span>));</pre>
|
||||
</div><h4 id='method.is_match' class="method"><span id='is_match.v' class='invisible'><code>pub fn <a href='#method.is_match' class='fnname'>is_match</a>(&self, text: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#133-135' title='goto source code'>[src]</a></span></h4>
|
||||
<div class='docblock'><p>Returns true if and only if one of the regexes in this set matches
|
||||
</div><h4 id='method.is_match' class="method"><span id='is_match.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.is_match' class='fnname'>is_match</a>(&self, text: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#133-135' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns true if and only if one of the regexes in this set matches
|
||||
the text given.</p>
|
||||
<p>This method should be preferred if you only need to test whether any
|
||||
of the regexes in the set should match, but don't care about <em>which</em>
|
||||
@@ -163,8 +158,7 @@ text.</p>
|
||||
<span class="kw">let</span> <span class="ident">set</span> <span class="op">=</span> <span class="ident">RegexSet</span>::<span class="ident">new</span>(<span class="kw-2">&</span>[<span class="string">r"\w+"</span>, <span class="string">r"\d+"</span>]).<span class="ident">unwrap</span>();
|
||||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">set</span>.<span class="ident">is_match</span>(<span class="string">"foo"</span>));
|
||||
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">set</span>.<span class="ident">is_match</span>(<span class="string">"☃"</span>));</pre>
|
||||
</div><h4 id='method.matches' class="method"><span id='matches.v' class='invisible'><code>pub fn <a href='#method.matches' class='fnname'>matches</a>(&self, text: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="struct" href="../../regex/bytes/struct.SetMatches.html" title="struct regex::bytes::SetMatches">SetMatches</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#184-191' title='goto source code'>[src]</a></span></h4>
|
||||
<div class='docblock'><p>Returns the set of regular expressions that match in the given text.</p>
|
||||
</div><h4 id='method.matches' class="method"><span id='matches.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.matches' class='fnname'>matches</a>(&self, text: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="struct" href="../../regex/bytes/struct.SetMatches.html" title="struct regex::bytes::SetMatches">SetMatches</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#184-191' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the set of regular expressions that match in the given text.</p>
|
||||
<p>The set returned contains the index of each regular expression that
|
||||
matches in the given text. The index is in correspondence with the
|
||||
order of regular expressions given to <code>RegexSet</code>'s constructor.</p>
|
||||
@@ -193,29 +187,21 @@ text.</p>
|
||||
<span class="kw">let</span> <span class="ident">matches</span> <span class="op">=</span> <span class="ident">set</span>.<span class="ident">matches</span>(<span class="string">"foobar"</span>);
|
||||
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">matches</span>.<span class="ident">matched</span>(<span class="number">5</span>));
|
||||
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">matches</span>.<span class="ident">matched</span>(<span class="number">6</span>));</pre>
|
||||
</div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><code>pub fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#216-218' title='goto source code'>[src]</a></span></h4>
|
||||
<div class='docblock'><p>Returns the total number of regular expressions in this set.</p>
|
||||
</div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#216-218' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the total number of regular expressions in this set.</p>
|
||||
</div></div>
|
||||
<h2 id='implementations' class='small-section-header'>
|
||||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||||
</h2>
|
||||
<div id='implementations-list'>
|
||||
<h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#85' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#85' title='goto source code'>[src]</a></span></h4>
|
||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#117-119' title='goto source code'>[src]</a></span></h4>
|
||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#343-347' title='goto source code'>[src]</a></span></h3>
|
||||
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#344-346' title='goto source code'>[src]</a></span></h4>
|
||||
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
<h3 id='impl-Clone' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl-Clone' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#85' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#85' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#117-119' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#343-347' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/regex/re_set.rs.html#344-346' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div></div>
|
||||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||||
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
||||
</h2>
|
||||
<div id='synthetic-implementations-list'>
|
||||
<h3 id='impl-Send' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl-Send' class='anchor'></a></span><span class='out-of-band'></span></h3>
|
||||
<div class='impl-items'></div><h3 id='impl-Sync' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl-Sync' class='anchor'></a></span><span class='out-of-band'></span></h3>
|
||||
<div class='impl-items'></div></div></section>
|
||||
<h3 id='impl-Send' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../regex/bytes/struct.RegexSet.html" title="struct regex::bytes::RegexSet">RegexSet</a></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div></div></section>
|
||||
<section id='search' class="content hidden"></section>
|
||||
|
||||
<section class="footer"></section>
|
||||
|
||||
Reference in New Issue
Block a user