mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-20 10:10:42 +00:00
251 lines
31 KiB
HTML
251 lines
31 KiB
HTML
<!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 `Streamer` trait in crate `fst`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, Streamer">
|
||
|
||
<title>fst::Streamer - 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>
|
||
|
||
|
||
|
||
|
||
</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">☰</div>
|
||
|
||
<p class='location'>Trait Streamer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Item">Item</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.next">next</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>fst</a></p><script>window.sidebarCurrent = {name: 'Streamer', 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 js-only">
|
||
<div class="search-container">
|
||
<input class="search-input" name="search"
|
||
autocomplete="off"
|
||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||
type="search">
|
||
</div>
|
||
</form>
|
||
</nav>
|
||
|
||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Trait <a href='index.html'>fst</a>::<wbr><a class="trait" href=''>Streamer</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/fst/stream.rs.html#97-107' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust trait'>pub trait Streamer<'a> {
|
||
type <a href='#associatedtype.Item' class="type">Item</a>: 'a;
|
||
fn <a href='#tymethod.next' class='fnname'>next</a>(&'a mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="../fst/trait.Streamer.html#associatedtype.Item" title="type fst::Streamer::Item">Item</a>>;
|
||
}</pre></div><div class='docblock'><p>Streamer describes a "streaming iterator."</p>
|
||
<p>It provides a mechanism for writing code that is generic over streams
|
||
produced by this crate.</p>
|
||
<p>Note that this is strictly less useful than <code>Iterator</code> because the item
|
||
associated type is bound to a specific lifetime. However, this does permit
|
||
us to write <em>some</em> generic code over streams that produce values tied
|
||
to the lifetime of the stream.</p>
|
||
<p>Some form of stream abstraction is inherently required for this crate
|
||
because elements in a finite state transducer are produced <em>by iterating</em>
|
||
over the structure. The alternative would be to create a new allocation
|
||
for each element iterated over, which would be prohibitively expensive.</p>
|
||
<h1 id="usage--motivation" class="section-header"><a href="#usage--motivation">Usage & motivation</a></h1>
|
||
<p>Streams are hard to use because they don't fit into Rust's current type
|
||
system very well. They are so hard to use that this author loathes having a
|
||
publically defined trait for it. Nevertheless, they do just barely provide
|
||
a means for composing multiple stream abstractions with different concrete
|
||
types. For example, one might want to take the union of a range query
|
||
stream with a stream that has been filtered by a regex. These streams have
|
||
different concrete types. A <code>Streamer</code> trait allows us to write code that
|
||
is generic over these concrete types. (All of the set operations are
|
||
implemented this way.)</p>
|
||
<p>A problem with streams is that the trait is itself parameterized by a
|
||
lifetime. In practice, this makes them very unergonomic because specifying
|
||
a <code>Streamer</code> bound generally requires a higher-ranked trait bound. This is
|
||
necessary because the lifetime can't actually be named in the enclosing
|
||
function; instead, the lifetime is local to iteration itself. Therefore,
|
||
one must assert that the bound is valid for <em>any particular</em> lifetime.
|
||
This is the essence of higher-rank trait bounds.</p>
|
||
<p>Because of this, you might expect to see lots of bounds that look like
|
||
this:</p>
|
||
|
||
<div class='information'><div class='tooltip ignore'>ⓘ<span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
|
||
<span class="kw">fn</span> <span class="ident">takes_stream</span><span class="op"><</span><span class="ident">T</span>, <span class="ident">S</span><span class="op">></span>(<span class="ident">s</span>: <span class="ident">S</span>)
|
||
<span class="kw">where</span> <span class="ident">S</span>: <span class="kw">for</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> <span class="ident">Streamer</span><span class="op"><</span><span class="lifetime">'a</span>, <span class="ident">Item</span><span class="op">=</span><span class="ident">T</span><span class="op">></span>
|
||
{
|
||
}</pre>
|
||
<p>There are <em>three</em> different problems with this declaration:</p>
|
||
<ol>
|
||
<li><code>S</code> is not bound by any particular lifetime itself, and most streams
|
||
probably contain a reference to an underlying finite state transducer.</li>
|
||
<li>It is often convenient to separate the notion of "stream" with
|
||
"stream constructor." This represents a similar split found in the
|
||
standard library for <code>Iterator</code> and <code>IntoIterator</code>, respectively.</li>
|
||
<li>The <code>Item=T</code> is invalid because <code>Streamer</code>'s associated type is
|
||
parameterized by a lifetime and there is no way to parameterize an
|
||
arbitrary type constructor. (In this context, <code>T</code> is the type
|
||
constructor, because it will invariably require a lifetime to become
|
||
a concrete type.)</li>
|
||
</ol>
|
||
<p>With that said, we must revise our possibly-workable bounds to a giant
|
||
scary monster:</p>
|
||
|
||
<div class='information'><div class='tooltip ignore'>ⓘ<span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
|
||
<span class="kw">fn</span> <span class="ident">takes_stream</span><span class="op"><</span><span class="lifetime">'f</span>, <span class="ident">I</span>, <span class="ident">S</span><span class="op">></span>(<span class="ident">s</span>: <span class="ident">I</span>)
|
||
<span class="kw">where</span> <span class="ident">I</span>: <span class="kw">for</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> <span class="ident">IntoStreamer</span><span class="op"><</span><span class="lifetime">'a</span>, <span class="ident">Into</span><span class="op">=</span><span class="ident">S</span>, <span class="ident">Item</span><span class="op">=</span>(<span class="kw-2">&</span><span class="lifetime">'a</span> [<span class="ident">u8</span>], <span class="ident">Output</span>)<span class="op">></span>,
|
||
<span class="ident">S</span>: <span class="lifetime">'f</span> <span class="op">+</span> <span class="kw">for</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span> <span class="ident">Streamer</span><span class="op"><</span><span class="lifetime">'a</span>, <span class="ident">Item</span><span class="op">=</span>(<span class="kw-2">&</span><span class="lifetime">'a</span> [<span class="ident">u8</span>], <span class="ident">Output</span>)<span class="op">></span>
|
||
{
|
||
}</pre>
|
||
<p>We addressed the above points correspondingly:</p>
|
||
<ol>
|
||
<li><code>S</code> is now bound by <code>'f</code>, which corresponds to the lifetime (possibly
|
||
<code>'static</code>) of the underlying stream.</li>
|
||
<li>The <code>I</code> type parameter has been added to refer to a type that knows how
|
||
to build a stream. Notice that neither of the bounds for <code>I</code> or <code>S</code>
|
||
share a lifetime parameter. This is because the higher rank trait bound
|
||
specifies it works for <em>any</em> particular lifetime.</li>
|
||
<li><code>T</code> has been replaced with specific concrete types. Note that these
|
||
concrete types are duplicated. With iterators, we could use
|
||
<code>Item=S::Item</code> in the bound for <code>I</code>, but one cannot access an associated
|
||
type through a higher-ranked trait bound. Therefore, we must duplicate
|
||
the item type.</li>
|
||
</ol>
|
||
<p>As you can see, streams offer little flexibility, little ergonomics and a
|
||
lot of hard to read trait bounds. The situation is lamentable, but
|
||
nevertheless, without them, we would not be able to compose streams by
|
||
leveraging the type system.</p>
|
||
<p>A redeemable quality is that these <em>same exact</em> trait bounds (modulo some
|
||
tweaks in the <code>Item</code> associated type) appear in many places in this crate
|
||
without much variation. Therefore, once you grok it, it's mostly easy to
|
||
pattern match it with "oh I need a stream." My hope is that clear
|
||
documentation and examples make these complex bounds easier to burden.</p>
|
||
<p>Stretching this abstraction further with Rust's current type system is not
|
||
advised.</p>
|
||
</div>
|
||
<h2 id='associated-types' class='small-section-header'>
|
||
Associated Types<a href='#associated-types' class='anchor'></a>
|
||
</h2>
|
||
<div class='methods'>
|
||
<h3 id='associatedtype.Item' class='method'><span id='Item.t' class='invisible'><code>type <a href='#associatedtype.Item' class="type">Item</a>: 'a</code></span></h3><div class='docblock'><p>The type of the item emitted by this stream.</p>
|
||
</div></div>
|
||
<h2 id='required-methods' class='small-section-header'>
|
||
Required Methods<a href='#required-methods' class='anchor'></a>
|
||
</h2>
|
||
<div class='methods'>
|
||
<h3 id='tymethod.next' class='method'><span id='next.v' class='invisible'><code>fn <a href='#tymethod.next' class='fnname'>next</a>(&'a mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="../fst/trait.Streamer.html#associatedtype.Item" title="type fst::Streamer::Item">Item</a>></code></span></h3><div class='docblock'><p>Emits the next element in this stream, or <code>None</code> to indicate the stream
|
||
has been exhausted.</p>
|
||
<p>It is not specified what a stream does after <code>None</code> is emitted. In most
|
||
cases, <code>None</code> should be emitted on every subsequent call.</p>
|
||
</div></div>
|
||
<h2 id='implementors' class='small-section-header'>
|
||
Implementors<a href='#implementors' class='anchor'></a>
|
||
</h2>
|
||
<ul class='item-list' id='implementors-list'>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'm, A: <a class="trait" href="../fst/automaton/trait.Automaton.html" title="trait fst::automaton::Automaton">Automaton</a>> Streamer<'a> for fst::map::<a class="struct" href="../fst/map/struct.Stream.html" title="struct fst::map::Stream">Stream</a><'m, A><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/map.rs.html#581-587' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'm> Streamer<'a> for <a class="struct" href="../fst/map/struct.Keys.html" title="struct fst::map::Keys">Keys</a><'m><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/map.rs.html#635-641' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'm> Streamer<'a> for <a class="struct" href="../fst/map/struct.Values.html" title="struct fst::map::Values">Values</a><'m><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/map.rs.html#649-655' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'm> Streamer<'a> for fst::map::<a class="struct" href="../fst/map/struct.Union.html" title="struct fst::map::Union">Union</a><'m><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.slice.html">&'a [</a><a class="struct" href="../fst/raw/struct.IndexedValue.html" title="struct fst::raw::IndexedValue">IndexedValue</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.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/map.rs.html#948-954' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'm> Streamer<'a> for fst::map::<a class="struct" href="../fst/map/struct.Intersection.html" title="struct fst::map::Intersection">Intersection</a><'m><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.slice.html">&'a [</a><a class="struct" href="../fst/raw/struct.IndexedValue.html" title="struct fst::raw::IndexedValue">IndexedValue</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.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/map.rs.html#962-968' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'm> Streamer<'a> for fst::map::<a class="struct" href="../fst/map/struct.Difference.html" title="struct fst::map::Difference">Difference</a><'m><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.slice.html">&'a [</a><a class="struct" href="../fst/raw/struct.IndexedValue.html" title="struct fst::raw::IndexedValue">IndexedValue</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.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/map.rs.html#980-986' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'm> Streamer<'a> for fst::map::<a class="struct" href="../fst/map/struct.SymmetricDifference.html" title="struct fst::map::SymmetricDifference">SymmetricDifference</a><'m><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.slice.html">&'a [</a><a class="struct" href="../fst/raw/struct.IndexedValue.html" title="struct fst::raw::IndexedValue">IndexedValue</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.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/map.rs.html#994-1000' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'f> Streamer<'a> for fst::raw::<a class="struct" href="../fst/raw/struct.Union.html" title="struct fst::raw::Union">Union</a><'f><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.slice.html">&'a [</a><a class="struct" href="../fst/raw/struct.IndexedValue.html" title="struct fst::raw::IndexedValue">IndexedValue</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.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/raw/ops.rs.html#186-208' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'f> Streamer<'a> for fst::raw::<a class="struct" href="../fst/raw/struct.Intersection.html" title="struct fst::raw::Intersection">Intersection</a><'f><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.slice.html">&'a [</a><a class="struct" href="../fst/raw/struct.IndexedValue.html" title="struct fst::raw::IndexedValue">IndexedValue</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.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/raw/ops.rs.html#220-249' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'f> Streamer<'a> for fst::raw::<a class="struct" href="../fst/raw/struct.Difference.html" title="struct fst::raw::Difference">Difference</a><'f><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.slice.html">&'a [</a><a class="struct" href="../fst/raw/struct.IndexedValue.html" title="struct fst::raw::IndexedValue">IndexedValue</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.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/raw/ops.rs.html#266-295' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 'f> Streamer<'a> for fst::raw::<a class="struct" href="../fst/raw/struct.SymmetricDifference.html" title="struct fst::raw::SymmetricDifference">SymmetricDifference</a><'f><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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.slice.html">&'a [</a><a class="struct" href="../fst/raw/struct.IndexedValue.html" title="struct fst::raw::IndexedValue">IndexedValue</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.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/raw/ops.rs.html#307-338' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'f, 'a, A: <a class="trait" href="../fst/automaton/trait.Automaton.html" title="trait fst::automaton::Automaton">Automaton</a>> Streamer<'a> for fst::raw::<a class="struct" href="../fst/raw/struct.Stream.html" title="struct fst::raw::Stream">Stream</a><'f, A><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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="../fst/raw/struct.Output.html" title="struct fst::raw::Output">Output</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/raw/mod.rs.html#850-897' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 's, A: <a class="trait" href="../fst/automaton/trait.Automaton.html" title="trait fst::automaton::Automaton">Automaton</a>> Streamer<'a> for fst::set::<a class="struct" href="../fst/set/struct.Stream.html" title="struct fst::set::Stream">Stream</a><'s, A><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/set.rs.html#545-551' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 's> Streamer<'a> for fst::set::<a class="struct" href="../fst/set/struct.Union.html" title="struct fst::set::Union">Union</a><'s><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/set.rs.html#767-773' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 's> Streamer<'a> for fst::set::<a class="struct" href="../fst/set/struct.Intersection.html" title="struct fst::set::Intersection">Intersection</a><'s><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/set.rs.html#780-786' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 's> Streamer<'a> for fst::set::<a class="struct" href="../fst/set/struct.Difference.html" title="struct fst::set::Difference">Difference</a><'s><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/set.rs.html#797-803' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
<li><table class='table-display'><tbody><tr><td><code>impl<'a, 's> Streamer<'a> for fst::set::<a class="struct" href="../fst/set/struct.SymmetricDifference.html" title="struct fst::set::SymmetricDifference">SymmetricDifference</a><'s><span class="where fmt-newline"> type <a href='#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</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>;</span></code><td><div class='out-of-band'><a class='srclink' href='../src/fst/set.rs.html#811-817' title='goto source code'>[src]</a></div></td></tr></tbody></table></li>
|
||
</ul><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
|
||
src="../implementors/fst/trait.Streamer.js">
|
||
</script></section>
|
||
<section id='search' class="content hidden"></section>
|
||
|
||
<section class="footer"></section>
|
||
|
||
<aside id="help" class="hidden">
|
||
<div>
|
||
<h1 class="hidden">Help</h1>
|
||
|
||
<div class="shortcuts">
|
||
<h2>Keyboard Shortcuts</h2>
|
||
|
||
<dl>
|
||
<dt><kbd>?</kbd></dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt><kbd>S</kbd></dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt><kbd>↑</kbd></dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt><kbd>↓</kbd></dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt><kbd>↹</kbd></dt>
|
||
<dd>Switch tab</dd>
|
||
<dt><kbd>⏎</kbd></dt>
|
||
<dd>Go to active search result</dd>
|
||
<dt><kbd>+</kbd></dt>
|
||
<dd>Expand all sections</dd>
|
||
<dt><kbd>-</kbd></dt>
|
||
<dd>Collapse all sections</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div class="infos">
|
||
<h2>Search Tricks</h2>
|
||
|
||
<p>
|
||
Prefix searches with a type followed by a colon (e.g.
|
||
<code>fn:</code>) to restrict the search to a given type.
|
||
</p>
|
||
|
||
<p>
|
||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||
<code>struct</code>, <code>enum</code>,
|
||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||
and <code>const</code>.
|
||
</p>
|
||
|
||
<p>
|
||
Search functions by type signature (e.g.
|
||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../";
|
||
window.currentCrate = "fst";
|
||
</script>
|
||
<script src="../main.js"></script>
|
||
<script defer src="../search-index.js"></script>
|
||
</body>
|
||
</html> |