mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-20 10:10:42 +00:00
248 lines
27 KiB
HTML
248 lines
27 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 `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">☰</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'>−</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<W>(_);</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<u8></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">"bruce"</span>, <span class="number">1</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">"clarence"</span>, <span class="number">2</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">"stevie"</span>, <span class="number">3</span>).<span class="ident">unwrap</span>();
|
||
|
||
<span class="comment">// You could also call `finish()` here, but since we're building the map in</span>
|
||
<span class="comment">// memory, there would be no way to get the `Vec<u8>` 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'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"bruce"</span>.<span class="ident">to_vec</span>(), <span class="number">1</span>),
|
||
(<span class="string">b"clarence"</span>.<span class="ident">to_vec</span>(), <span class="number">2</span>),
|
||
(<span class="string">b"stevie"</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">"map.fst"</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">"bruce"</span>, <span class="number">1</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">"clarence"</span>, <span class="number">2</span>).<span class="ident">unwrap</span>();
|
||
<span class="ident">build</span>.<span class="ident">insert</span>(<span class="string">"stevie"</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'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">"map.fst"</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"bruce"</span>.<span class="ident">to_vec</span>(), <span class="number">1</span>),
|
||
(<span class="string">b"clarence"</span>.<span class="ident">to_vec</span>(), <span class="number">2</span>),
|
||
(<span class="string">b"stevie"</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><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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/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>() -> 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<W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>> <a class="struct" href="../fst/struct.MapBuilder.html" title="struct fst::MapBuilder">MapBuilder</a><W></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) -> <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a><<a class="struct" href="../fst/struct.MapBuilder.html" title="struct fst::MapBuilder">MapBuilder</a><W>></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><K: <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.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>>>(&mut self, key: K, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></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><K, I>(&mut self, iter: I) -> <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> <span class="where fmt-newline">where<br> K: <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.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>>,<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 = <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>>, </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><'f, I, S>(&mut self, stream: I) -> <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> <span class="where fmt-newline">where<br> I: for<'a> <a class="trait" href="../fst/trait.IntoStreamer.html" title="trait fst::IntoStreamer">IntoStreamer</a><'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">&'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>>,<br> S: 'f + for<'a> <a class="trait" href="../fst/trait.Streamer.html" title="trait fst::Streamer">Streamer</a><'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">&'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></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) -> <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></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) -> <a class="type" href="../fst/type.Result.html" title="type fst::Result">Result</a><W></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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</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>(&self) -> <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='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<W> <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><W> <span class="where fmt-newline">where<br> W: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </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<W> <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><W> <span class="where fmt-newline">where<br> W: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </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>⏎</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> |