Files
mercator_service/nom/lib/std/str/pattern/trait.DoubleEndedSearcher.html

21 lines
7.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `DoubleEndedSearcher` trait in crate `nom`."><meta name="keywords" content="rust, rustlang, rust-lang, DoubleEndedSearcher"><title>nom::lib::std::str::pattern::DoubleEndedSearcher - Rust</title><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><script src="../../../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../../../nom/index.html'><div class='logo-container'><img src='../../../../../rust-logo.png' alt='logo'></div></a><p class='location'>Trait DoubleEndedSearcher</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../../../../index.html'>nom</a>::<wbr><a href='../../../index.html'>lib</a>::<wbr><a href='../../index.html'>std</a>::<wbr><a href='../index.html'>str</a>::<wbr><a href='index.html'>pattern</a></p><script>window.sidebarCurrent = {name: 'DoubleEndedSearcher', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../../../../settings.html"><img src="../../../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span class='since' title='Stable since Rust version '></span><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/str/pattern.rs.html#231' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../../../../index.html'>nom</a>::<wbr><a href='../../../index.html'>lib</a>::<wbr><a href='../../index.html'>std</a>::<wbr><a href='../index.html'>str</a>::<wbr><a href='index.html'>pattern</a>::<wbr><a class="trait" href=''>DoubleEndedSearcher</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait DoubleEndedSearcher&lt;'a&gt;: <a class="trait" href="../../../../../nom/lib/std/str/pattern/trait.ReverseSearcher.html" title="trait nom::lib::std::str::pattern::ReverseSearcher">ReverseSearcher</a>&lt;'a&gt; { }</pre></div><div class='stability'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>pattern</code>)</summary><p>API not fully fleshed out and ready to be stabilized</p>
</details></div></div><div class='docblock'><p>A marker trait to express that a <code>ReverseSearcher</code>
can be used for a <code>DoubleEndedIterator</code> implementation.</p>
<p>For this, the impl of <code>Searcher</code> and <code>ReverseSearcher</code> need
to follow these conditions:</p>
<ul>
<li>All results of <code>next()</code> need to be identical
to the results of <code>next_back()</code> in reverse order.</li>
<li><code>next()</code> and <code>next_back()</code> need to behave as
the two ends of a range of values, that is they
can not &quot;walk past each other&quot;.</li>
</ul>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<p><code>char::Searcher</code> is a <code>DoubleEndedSearcher</code> because searching for a
<code>char</code> only requires looking at one at a time, which behaves the same
from both ends.</p>
<p><code>(&amp;str)::Searcher</code> is not a <code>DoubleEndedSearcher</code> because
the pattern <code>&quot;aa&quot;</code> in the haystack <code>&quot;aaa&quot;</code> matches as either
<code>&quot;[aa]a&quot;</code> or <code>&quot;a[aa]&quot;</code>, depending from which side it is searched.</p>
</div>
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-DoubleEndedSearcher%3C%27a%3E' class='impl'><code class='in-band'>impl&lt;'a&gt; DoubleEndedSearcher&lt;'a&gt; for <a class="struct" href="../../../../../nom/lib/std/str/pattern/struct.CharSearcher.html" title="struct nom::lib::std::str::pattern::CharSearcher">CharSearcher</a>&lt;'a&gt;</code><a href='#impl-DoubleEndedSearcher%3C%27a%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/str/pattern.rs.html#420' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-DoubleEndedSearcher%3C%27a%3E-1' class='impl'><code class='in-band'>impl&lt;'a, 'b&gt; DoubleEndedSearcher&lt;'a&gt; for <a class="struct" href="../../../../../nom/lib/std/str/pattern/struct.CharSliceSearcher.html" title="struct nom::lib::std::str::pattern::CharSliceSearcher">CharSliceSearcher</a>&lt;'a, 'b&gt;</code><a href='#impl-DoubleEndedSearcher%3C%27a%3E-1' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/str/pattern.rs.html#638' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-DoubleEndedSearcher%3C%27a%3E-2' class='impl'><code class='in-band'>impl&lt;'a, F&gt; DoubleEndedSearcher&lt;'a&gt; for <a class="struct" href="../../../../../nom/lib/std/str/pattern/struct.CharPredicateSearcher.html" title="struct nom::lib::std::str::pattern::CharPredicateSearcher">CharPredicateSearcher</a>&lt;'a, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../../../../nom/lib/std/prelude/v1/v1/trait.FnMut.html" title="trait nom::lib::std::prelude::v1::v1::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,&nbsp;</span></code><a href='#impl-DoubleEndedSearcher%3C%27a%3E-2' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/str/pattern.rs.html#680' title='goto source code'>[src]</a></h3><div class='impl-items'></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../../../../../implementors/core/str/pattern/trait.DoubleEndedSearcher.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../../../";window.currentCrate = "nom";</script><script src="../../../../../aliases.js"></script><script src="../../../../../main.js"></script><script defer src="../../../../../search-index.js"></script></body></html>