Files
tantivy/master/fst/struct.MapBuilder.html
2018-03-31 04:42:51 +00:00

253 lines
27 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 `MapBuilder` struct in crate `fst`.">
<meta name="keywords" content="rust, rustlang, rust-lang, MapBuilder">
<title>fst::MapBuilder - 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 struct">
<!--[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>
<p class='location'>Struct MapBuilder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.memory">memory</a><a href="#method.new">new</a><a href="#method.insert">insert</a><a href="#method.extend_iter">extend_iter</a><a href="#method.extend_stream">extend_stream</a><a href="#method.finish">finish</a><a href="#method.into_inner">into_inner</a><a href="#method.get_ref">get_ref</a><a href="#method.bytes_written">bytes_written</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div></div><p class='location'><a href='index.html'>fst</a></p><script>window.sidebarCurrent = {name: 'MapBuilder', ty: 'struct', 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'>Struct <a href='index.html'>fst</a>::<wbr><a class="struct" href=''>MapBuilder</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'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../src/fst/map.rs.html#491' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct MapBuilder&lt;W&gt;(_);</pre></div><div class='docblock'><p>A builder for creating a map.</p>
<p>This is not your average everyday builder. It has two important qualities
that make it a bit unique from what you might expect:</p>
<ol>
<li>All keys must be added in lexicographic order. Adding a key out of order
will result in an error. Additionally, adding a duplicate key will also
result in an error. That is, once a key is associated with a value,
that association can never be modified or deleted.</li>
<li>The representation of a map is streamed to <em>any</em> <code>io::Write</code> as it is
built. For an in memory representation, this can be a <code>Vec&lt;u8&gt;</code>.</li>
</ol>
<p>Point (2) is especially important because it means that a map can be
constructed <em>without storing the entire map in memory</em>. Namely, since it
works with any <code>io::Write</code>, it can be streamed directly to a file.</p>
<p>With that said, the builder does use memory, but <strong>memory usage is bounded
to a constant size</strong>. The amount of memory used trades off with the
compression ratio. Currently, the implementation hard codes this trade off
which can result in about 5-20MB of heap usage during construction. (N.B.
Guaranteeing a maximal compression ratio requires memory proportional to
the size of the map, which defeats some of the benefit of streaming
it to disk. In practice, a small bounded amount of memory achieves
close-to-minimal compression ratios.)</p>
<p>The algorithmic complexity of map construction is <code>O(n)</code> where <code>n</code> is the
number of elements added to the map.</p>
<h1 id="example-build-in-memory" class="section-header"><a href="#example-build-in-memory">Example: build in memory</a></h1>
<p>This shows how to use the builder to construct a map in memory. Note that
<code>Map::from_iter</code> provides a convenience function that achieves this same
goal without needing to explicitly use <code>MapBuilder</code>.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">fst</span>::{<span class="ident">IntoStreamer</span>, <span class="ident">Streamer</span>, <span class="ident">Map</span>, <span class="ident">MapBuilder</span>};
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">build</span> <span class="op">=</span> <span class="ident">MapBuilder</span>::<span class="ident">memory</span>();
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">&quot;bruce&quot;</span>, <span class="number">1</span>).<span class="ident">unwrap</span>();
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">&quot;clarence&quot;</span>, <span class="number">2</span>).<span class="ident">unwrap</span>();
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">&quot;stevie&quot;</span>, <span class="number">3</span>).<span class="ident">unwrap</span>();
<span class="comment">// You could also call `finish()` here, but since we&#39;re building the map in</span>
<span class="comment">// memory, there would be no way to get the `Vec&lt;u8&gt;` back.</span>
<span class="kw">let</span> <span class="ident">bytes</span> <span class="op">=</span> <span class="ident">build</span>.<span class="ident">into_inner</span>().<span class="ident">unwrap</span>();
<span class="comment">// At this point, the map has been constructed, but here&#39;s how to read it.</span>
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">Map</span>::<span class="ident">from_bytes</span>(<span class="ident">bytes</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stream</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">into_stream</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">kvs</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[];
<span class="kw">while</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">k</span>, <span class="ident">v</span>)) <span class="op">=</span> <span class="ident">stream</span>.<span class="ident">next</span>() {
<span class="ident">kvs</span>.<span class="ident">push</span>((<span class="ident">k</span>.<span class="ident">to_vec</span>(), <span class="ident">v</span>));
}
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">kvs</span>, <span class="macro">vec</span><span class="macro">!</span>[
(<span class="string">b&quot;bruce&quot;</span>.<span class="ident">to_vec</span>(), <span class="number">1</span>),
(<span class="string">b&quot;clarence&quot;</span>.<span class="ident">to_vec</span>(), <span class="number">2</span>),
(<span class="string">b&quot;stevie&quot;</span>.<span class="ident">to_vec</span>(), <span class="number">3</span>),
]);</pre>
<h1 id="example-stream-to-file" class="section-header"><a href="#example-stream-to-file">Example: stream to file</a></h1>
<p>This shows how to do stream construction of a map to a file.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fs</span>::<span class="ident">File</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>;
<span class="kw">use</span> <span class="ident">fst</span>::{<span class="ident">IntoStreamer</span>, <span class="ident">Streamer</span>, <span class="ident">Map</span>, <span class="ident">MapBuilder</span>};
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">wtr</span> <span class="op">=</span> <span class="ident">io</span>::<span class="ident">BufWriter</span>::<span class="ident">new</span>(<span class="ident">File</span>::<span class="ident">create</span>(<span class="string">&quot;map.fst&quot;</span>).<span class="ident">unwrap</span>());
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">build</span> <span class="op">=</span> <span class="ident">MapBuilder</span>::<span class="ident">new</span>(<span class="ident">wtr</span>).<span class="ident">unwrap</span>();
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">&quot;bruce&quot;</span>, <span class="number">1</span>).<span class="ident">unwrap</span>();
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">&quot;clarence&quot;</span>, <span class="number">2</span>).<span class="ident">unwrap</span>();
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">&quot;stevie&quot;</span>, <span class="number">3</span>).<span class="ident">unwrap</span>();
<span class="comment">// If you want the writer back, then call `into_inner`. Otherwise, this</span>
<span class="comment">// will finish construction and call `flush`.</span>
<span class="ident">build</span>.<span class="ident">finish</span>().<span class="ident">unwrap</span>();
<span class="comment">// At this point, the map has been constructed, but here&#39;s how to read it.</span>
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">Map</span>::<span class="ident">from_path</span>(<span class="string">&quot;map.fst&quot;</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">stream</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">into_stream</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">kvs</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[];
<span class="kw">while</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="ident">k</span>, <span class="ident">v</span>)) <span class="op">=</span> <span class="ident">stream</span>.<span class="ident">next</span>() {
<span class="ident">kvs</span>.<span class="ident">push</span>((<span class="ident">k</span>.<span class="ident">to_vec</span>(), <span class="ident">v</span>));
}
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">kvs</span>, <span class="macro">vec</span><span class="macro">!</span>[
(<span class="string">b&quot;bruce&quot;</span>.<span class="ident">to_vec</span>(), <span class="number">1</span>),
(<span class="string">b&quot;clarence&quot;</span>.<span class="ident">to_vec</span>(), <span class="number">2</span>),
(<span class="string">b&quot;stevie&quot;</span>.<span class="ident">to_vec</span>(), <span class="number">3</span>),
]);</pre>
</div>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../fst/struct.MapBuilder.html" title="struct fst::MapBuilder">MapBuilder</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;&gt;</code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#493-498' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.memory' class="method"><span id='memory.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.memory' class='fnname'>memory</a>() -&gt; Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#495-497' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a builder that builds a map in memory.</p>
</div></div><h3 id='impl-1' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;W:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>&gt; <a class="struct" href="../fst/struct.MapBuilder.html" title="struct fst::MapBuilder">MapBuilder</a>&lt;W&gt;</code><a href='#impl-1' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#500-571' 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>(wtr: W) -&gt; <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a>&lt;<a class="struct" href="../fst/struct.MapBuilder.html" title="struct fst::MapBuilder">MapBuilder</a>&lt;W&gt;&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#503-505' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a builder that builds a map by writing it to <code>wtr</code> in a
streaming fashion.</p>
</div><h4 id='method.insert' class="method"><span id='insert.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.insert' class='fnname'>insert</a>&lt;K:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<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>&gt;&gt;(&amp;mut self, key: K, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#516-518' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Insert a new key-value pair into the map.</p>
<p>Keys must be convertible to byte strings. Values must be a <code>u64</code>, which
is a restriction of the current implementation of finite state
transducers. (Values may one day be expanded to other types.)</p>
<p>If a key is inserted that is less than or equal to any previous key
added, then an error is returned. Similarly, if there was a problem
writing to the underlying writer, an error is returned.</p>
</div><h4 id='method.extend_iter' class="method"><span id='extend_iter.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.extend_iter' class='fnname'>extend_iter</a>&lt;K, I&gt;(&amp;mut self, iter: I) -&gt; <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<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>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;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>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>K, <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>&gt;,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#528-532' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Calls insert on each item in the iterator.</p>
<p>If an error occurred while adding an element, processing is stopped
and the error is returned.</p>
<p>If a key is inserted that is less than or equal to any previous key
added, then an error is returned. Similarly, if there was a problem
writing to the underlying writer, an error is returned.</p>
</div><h4 id='method.extend_stream' class="method"><span id='extend_stream.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.extend_stream' class='fnname'>extend_stream</a>&lt;'f, I, S&gt;(&amp;mut self, stream: I) -&gt; <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: for&lt;'a&gt; <a class="trait" href="../fst/trait.IntoStreamer.html" title="trait fst::IntoStreamer">IntoStreamer</a>&lt;'a, Into = S, Item = <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">&amp;'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>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;S: 'f + for&lt;'a&gt; <a class="trait" href="../fst/trait.Streamer.html" title="trait fst::Streamer">Streamer</a>&lt;'a, Item = <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">&amp;'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>&gt;,&nbsp;</span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#542-546' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Calls insert on each item in the stream.</p>
<p>Note that unlike <code>extend_iter</code>, this is not generic on the items in
the stream.</p>
<p>If a key is inserted that is less than or equal to any previous key
added, then an error is returned. Similarly, if there was a problem
writing to the underlying writer, an error is returned.</p>
</div><h4 id='method.finish' class="method"><span id='finish.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.finish' class='fnname'>finish</a>(self) -&gt; <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#551-553' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Finishes the construction of the map and flushes the underlying
writer. After completion, the data written to <code>W</code> may be read using
one of <code>Map</code>'s constructor methods.</p>
</div><h4 id='method.into_inner' class="method"><span id='into_inner.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.into_inner' class='fnname'>into_inner</a>(self) -&gt; <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a>&lt;W&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#557-559' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Just like <code>finish</code>, except it returns the underlying writer after
flushing it.</p>
</div><h4 id='method.get_ref' class="method"><span id='get_ref.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.get_ref' class='fnname'>get_ref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>W</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#562-564' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Gets a reference to the underlying writer.</p>
</div><h4 id='method.bytes_written' class="method"><span id='bytes_written.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.bytes_written' class='fnname'>bytes_written</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/fst/map.rs.html#567-569' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the number of bytes written to the underlying writer</p>
</div></div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<div id='implementations-list'>
</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'><table class='table-display'><tbody><tr><td><code>impl&lt;W&gt; <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="../fst/struct.MapBuilder.html" title="struct fst::MapBuilder">MapBuilder</a>&lt;W&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,&nbsp;</span></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&lt;W&gt; <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="../fst/struct.MapBuilder.html" title="struct fst::MapBuilder">MapBuilder</a>&lt;W&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,&nbsp;</span></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>
<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>&#9166;</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>