mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-23 19:50:42 +00:00
221 lines
52 KiB
HTML
221 lines
52 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 `Fst` struct in crate `fst`."><meta name="keywords" content="rust, rustlang, rust-lang, Fst"><title>fst::raw::Fst - 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 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><a href='../../fst/index.html'><img src='../../rust-logo.png' alt='logo' width='100'></a><p class='location'>Struct Fst</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.as_bytes">as_bytes</a><a href="#method.contains_key">contains_key</a><a href="#method.from_bytes">from_bytes</a><a href="#method.from_shared_bytes">from_shared_bytes</a><a href="#method.from_static_slice">from_static_slice</a><a href="#method.fst_type">fst_type</a><a href="#method.get">get</a><a href="#method.is_disjoint">is_disjoint</a><a href="#method.is_empty">is_empty</a><a href="#method.is_subset">is_subset</a><a href="#method.is_superset">is_superset</a><a href="#method.len">len</a><a href="#method.node">node</a><a href="#method.op">op</a><a href="#method.range">range</a><a href="#method.root">root</a><a href="#method.search">search</a><a href="#method.size">size</a><a href="#method.stream">stream</a><a href="#method.to_vec">to_vec</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-AsRef%3CFst%3E">AsRef<Fst></a><a href="#impl-From%3CFst%3E">From<Fst></a><a href="#impl-IntoStreamer%3C%27a%3E">IntoStreamer<'a></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><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow">Borrow</a><a href="#impl-BorrowMut">BorrowMut</a><a href="#impl-From">From</a><a href="#impl-Into">Into</a><a href="#impl-TryFrom">TryFrom</a><a href="#impl-TryInto">TryInto</a></div></div><p class='location'><a href='../index.html'>fst</a>::<wbr><a href='index.html'>raw</a></p><script>window.sidebarCurrent = {name: 'Fst', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" 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 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/raw/mod.rs.html#277-283' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>fst</a>::<wbr><a href='index.html'>raw</a>::<wbr><a class="struct" href=''>Fst</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Fst { /* fields omitted */ }</pre></div><div class='docblock'><p>An acyclic deterministic finite state transducer.</p>
|
||
<h1 id="how-does-it-work" class="section-header"><a href="#how-does-it-work">How does it work?</a></h1>
|
||
<p>The short answer: it's just like a prefix trie, which compresses keys
|
||
based only on their prefixes, except that a automaton/transducer also
|
||
compresses suffixes.</p>
|
||
<p>The longer answer is that keys in an automaton are stored only in the
|
||
transitions from one state to another. A key can be acquired by tracing
|
||
a path from the root of the automaton to any match state. The inputs along
|
||
each transition are concatenated. Once a match state is reached, the
|
||
concatenation of inputs up until that point corresponds to a single key.</p>
|
||
<p>But why is it called a transducer instead of an automaton? A finite state
|
||
transducer is just like a finite state automaton, except that it has output
|
||
transitions in addition to input transitions. Namely, the value associated
|
||
with any particular key is determined by summing the outputs along every
|
||
input transition that leads to the key's corresponding match state.</p>
|
||
<p>This is best demonstrated with a couple images. First, let's ignore the
|
||
"transducer" aspect and focus on a plain automaton.</p>
|
||
<p>Consider that your keys are abbreviations of some of the months in the
|
||
Gregorian calendar:</p>
|
||
|
||
<div class='information'><div class='tooltip ignore'>ⓘ<span class='tooltiptext'>This example is not tested</span></div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore">
|
||
<span class="ident">jan</span>
|
||
<span class="ident">feb</span>
|
||
<span class="ident">mar</span>
|
||
<span class="ident">apr</span>
|
||
<span class="ident">may</span>
|
||
<span class="ident">jun</span>
|
||
<span class="ident">jul</span></pre></div>
|
||
<p>The corresponding automaton that stores all of these as keys looks like
|
||
this:</p>
|
||
<p><img src="http://burntsushi.net/stuff/months-set.png" alt="finite state automaton" /></p>
|
||
<p>Notice here how the prefix and suffix of <code>jan</code> and <code>jun</code> are shared.
|
||
Similarly, the prefixes of <code>jun</code> and <code>jul</code> are shared and the prefixes
|
||
of <code>mar</code> and <code>may</code> are shared.</p>
|
||
<p>All of the keys from this automaton can be enumerated in lexicographic
|
||
order by following every transition from each node in lexicographic
|
||
order. Since it is acyclic, the procedure will terminate.</p>
|
||
<p>A key can be found by tracing it through the transitions in the automaton.
|
||
For example, the key <code>aug</code> is known not to be in the automaton by only
|
||
visiting the root state (because there is no <code>a</code> transition). For another
|
||
example, the key <code>jax</code> is known not to be in the set only after moving
|
||
through the transitions for <code>j</code> and <code>a</code>. Namely, after those transitions
|
||
are followed, there are no transitions for <code>x</code>.</p>
|
||
<p>Notice here that looking up a key is proportional the length of the key
|
||
itself. Namely, lookup time is not affected by the number of keys in the
|
||
automaton!</p>
|
||
<p>Additionally, notice that the automaton exploits the fact that many keys
|
||
share common prefixes and suffixes. For example, <code>jun</code> and <code>jul</code> are
|
||
represented with no more states than would be required to represent either
|
||
one on its own. Instead, the only change is a single extra transition. This
|
||
is a form of compression and is key to how the automatons produced by this
|
||
crate are so small.</p>
|
||
<p>Let's move on to finite state transducers. Consider the same set of keys
|
||
as above, but let's assign their numeric month values:</p>
|
||
|
||
<div class='information'><div class='tooltip ignore'>ⓘ<span class='tooltiptext'>This example is not tested</span></div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore">
|
||
<span class="ident">jan</span>,<span class="number">1</span>
|
||
<span class="ident">feb</span>,<span class="number">2</span>
|
||
<span class="ident">mar</span>,<span class="number">3</span>
|
||
<span class="ident">apr</span>,<span class="number">4</span>
|
||
<span class="ident">may</span>,<span class="number">5</span>
|
||
<span class="ident">jun</span>,<span class="number">6</span>
|
||
<span class="ident">jul</span>,<span class="number">7</span></pre></div>
|
||
<p>The corresponding transducer looks very similar to the automaton above,
|
||
except outputs have been added to some of the transitions:</p>
|
||
<p><img src="http://burntsushi.net/stuff/months-map.png" alt="finite state transducer" /></p>
|
||
<p>All of the operations with a transducer are the same as described above
|
||
for automatons. Additionally, the same compression techniques are used:
|
||
common prefixes and suffixes in keys are exploited.</p>
|
||
<p>The key difference is that some transitions have been given an output.
|
||
As one follows input transitions, one must sum the outputs as they
|
||
are seen. (A transition with no output represents the additive identity,
|
||
or <code>0</code> in this case.) For example, when looking up <code>feb</code>, the transition
|
||
<code>f</code> has output <code>2</code>, the transition <code>e</code> has output <code>0</code>, and the transition
|
||
<code>b</code> also has output <code>0</code>. The sum of these is <code>2</code>, which is exactly the
|
||
value we associated with <code>feb</code>.</p>
|
||
<p>For another more interesting example, consider <code>jul</code>. The <code>j</code> transition
|
||
has output <code>1</code>, the <code>u</code> transition has output <code>5</code> and the <code>l</code> transition
|
||
has output <code>1</code>. Summing these together gets us <code>7</code>, which is again the
|
||
correct value associated with <code>jul</code>. Notice that if we instead looked up
|
||
the <code>jun</code> key, then the <code>n</code> transition would be followed instead of the
|
||
<code>l</code> transition, which has no output. Therefore, the <code>jun</code> key equals
|
||
<code>1+5+0=6</code>.</p>
|
||
<p>The trick to transducers is that there exists a unique path through the
|
||
transducer for every key, and its outputs are stored appropriately along
|
||
this path such that the correct value is returned when they are all summed
|
||
together. This process also enables the data that makes up each value to be
|
||
shared across many values in the transducer in exactly the same way that
|
||
keys are shared. This is yet another form of compression!</p>
|
||
<h1 id="bonus-a-billion-strings" class="section-header"><a href="#bonus-a-billion-strings">Bonus: a billion strings</a></h1>
|
||
<p>The amount of compression one can get from automata can be absolutely
|
||
ridiuclous. Consider the particular case of storing all billion strings
|
||
in the range <code>0000000001-1000000000</code>, e.g.,</p>
|
||
|
||
<div class='information'><div class='tooltip ignore'>ⓘ<span class='tooltiptext'>This example is not tested</span></div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore">
|
||
<span class="number">0000000001</span>
|
||
<span class="number">0000000002</span>
|
||
...
|
||
<span class="number">0000000100</span>
|
||
<span class="number">0000000101</span>
|
||
...
|
||
<span class="number">0999999999</span>
|
||
<span class="number">1000000000</span></pre></div>
|
||
<p>The corresponding automaton looks like this:</p>
|
||
<p><img src="http://burntsushi.net/stuff/one-billion.png" alt="finite state automaton - one billion strings" /></p>
|
||
<p>Indeed, the on disk size of this automaton is a mere <strong>251 bytes</strong>.</p>
|
||
<p>Of course, this is a bit of a pathological best case, but it does serve
|
||
to show how good compression can be in the optimal case.</p>
|
||
<p>Also, check out the
|
||
<a href="http://burntsushi.net/stuff/one-billion-map.svg">corresponding transducer</a>
|
||
that maps each string to its integer value. It's a bit bigger, but still
|
||
only takes up <strong>896 bytes</strong> of space on disk. This demonstrates that
|
||
output values are also compressible.</p>
|
||
<h1 id="does-this-crate-produce-minimal-transducers" class="section-header"><a href="#does-this-crate-produce-minimal-transducers">Does this crate produce minimal transducers?</a></h1>
|
||
<p>For any non-trivial sized set of keys, it is unlikely that this crate will
|
||
produce a minimal transducer. As far as this author knows, guaranteeing a
|
||
minimal transducer requires working memory proportional to the number of
|
||
states. This can be quite costly and is anathema to the main design goal of
|
||
this crate: provide the ability to work with gigantic sets of strings with
|
||
constant memory overhead.</p>
|
||
<p>Instead, construction of a finite state transducer uses a cache of
|
||
states. More frequently used states are cached and reused, which provides
|
||
reasonably good compression ratios. (No comprehensive benchmarks exist to
|
||
back up this claim.)</p>
|
||
<p>It is possible that this crate may expose a way to guarantee minimal
|
||
construction of transducers at the expense of exorbitant memory
|
||
requirements.</p>
|
||
<h1 id="bibliography" class="section-header"><a href="#bibliography">Bibliography</a></h1>
|
||
<p>I initially got the idea to use finite state tranducers to represent
|
||
ordered sets/maps from
|
||
<a href="http://blog.mikemccandless.com/2010/12/using-finite-state-transducers-in.html">Michael
|
||
McCandless'</a>
|
||
work on incorporating transducers in Lucene.</p>
|
||
<p>However, my work would also not have been possible without the hard work
|
||
of many academics, especially
|
||
<a href="http://galaxy.eti.pg.gda.pl/katedry/kiw/pracownicy/Jan.Daciuk/personal/">Jan Daciuk</a>.</p>
|
||
<ul>
|
||
<li><a href="http://www.mitpressjournals.org/doi/pdfplus/10.1162/089120100561601">Incremental construction of minimal acyclic finite-state automata</a>
|
||
(Section 3 provides a decent overview of the algorithm used to construct
|
||
transducers in this crate, assuming all outputs are <code>0</code>.)</li>
|
||
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.24.3698&rep=rep1&type=pdf">Direct Construction of Minimal Acyclic Subsequential Transducers</a>
|
||
(The whole thing. The proof is dense but illuminating. The algorithm at
|
||
the end is the money shot, namely, it incorporates output values.)</li>
|
||
<li><a href="http://www.researchgate.net/profile/Jii_Dvorsky/publication/221568039_Word_Random_Access_Compression/links/0c96052c095630d5b3000000.pdf#page=116">Experiments with Automata Compression</a>, <a href="http://www.cs.put.poznan.pl/dweiss/site/publications/download/fsacomp.pdf">Smaller Representation of Finite State Automata</a>
|
||
(various compression techniques for representing states/transitions)</li>
|
||
<li><a href="http://www.pg.gda.pl/%7Ejandac/thesis.ps.gz">Jan Daciuk's dissertation</a>
|
||
(excellent for in depth overview)</li>
|
||
<li><a href="http://www.cs.mun.ca/%7Eharold/Courses/Old/CS4750/Diary/q3p2qx4lv71m5vew.pdf">Comparison of Construction Algorithms for Minimal, Acyclic, Deterministic, Finite-State Automata from Sets of Strings</a>
|
||
(excellent for surface level overview)</li>
|
||
</ul>
|
||
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/fst/raw/mod.rs.html#285-582' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from_bytes' class="method"><code id='from_bytes.v'>pub fn <a href='#method.from_bytes' class='fnname'>from_bytes</a>(bytes: <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>>) -> <a class="type" href="../../fst/type.Result.html" title="type fst::Result">Result</a><Self></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#322-324' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a transducer from its representation as a raw byte sequence.</p>
|
||
<p>Note that this operation is very cheap (no allocations and no copies).</p>
|
||
<p>The fst must have been written with a compatible finite state
|
||
transducer builder (<code>Builder</code> qualifies). If the format is invalid or
|
||
if there is a mismatch between the API version of this library and the
|
||
fst, then an error is returned.</p>
|
||
</div><h4 id='method.from_static_slice' class="method"><code id='from_static_slice.v'>pub fn <a href='#method.from_static_slice' class='fnname'>from_static_slice</a>(bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'static [</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="type" href="../../fst/type.Result.html" title="type fst::Result">Result</a><Self></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#331-333' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a transducer from its representation as a raw byte sequence.</p>
|
||
<p>This accepts a static byte slice, which may be useful if the Fst
|
||
is embedded into source code.</p>
|
||
</div><h4 id='method.from_shared_bytes' class="method"><code id='from_shared_bytes.v'>pub fn <a href='#method.from_shared_bytes' class='fnname'>from_shared_bytes</a>(<br> bytes: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</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>>>, <br> offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> <a class="type" href="../../fst/type.Result.html" title="type fst::Result">Result</a><Self></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#341-347' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a transducer from a shared vector at the given offset and
|
||
length.</p>
|
||
<p>This permits creating multiple transducers from a single region of
|
||
owned memory.</p>
|
||
</div><h4 id='method.get' class="method"><code id='get.v'>pub fn <a href='#method.get' class='fnname'>get</a><B: <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>>>(&self, key: B) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../fst/raw/struct.Output.html" title="struct fst::raw::Output">Output</a>></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#411-429' title='goto source code'>[src]</a></h4><div class='docblock'><p>Retrieves the value associated with a key.</p>
|
||
<p>If the key does not exist, then <code>None</code> is returned.</p>
|
||
</div><h4 id='method.contains_key' class="method"><code id='contains_key.v'>pub fn <a href='#method.contains_key' class='fnname'>contains_key</a><B: <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>>>(&self, key: B) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#432-441' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns true if and only if the given key is in this FST.</p>
|
||
</div><h4 id='method.stream' class="method"><code id='stream.v'>pub fn <a href='#method.stream' class='fnname'>stream</a>(&self) -> <a class="struct" href="../../fst/raw/struct.Stream.html" title="struct fst::raw::Stream">Stream</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#446-448' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a lexicographically ordered stream of all key-value pairs in
|
||
this fst.</p>
|
||
</div><h4 id='method.range' class="method"><code id='range.v'>pub fn <a href='#method.range' class='fnname'>range</a>(&self) -> <a class="struct" href="../../fst/raw/struct.StreamBuilder.html" title="struct fst::raw::StreamBuilder">StreamBuilder</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#455-457' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a builder for range queries.</p>
|
||
<p>A range query returns a subset of key-value pairs in this fst in a
|
||
range given in lexicographic order.</p>
|
||
</div><h4 id='method.search' class="method"><code id='search.v'>pub fn <a href='#method.search' class='fnname'>search</a><A: <a class="trait" href="../../fst/automaton/trait.Automaton.html" title="trait fst::automaton::Automaton">Automaton</a>>(&self, aut: A) -> <a class="struct" href="../../fst/raw/struct.StreamBuilder.html" title="struct fst::raw::StreamBuilder">StreamBuilder</a><A></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#460-462' title='goto source code'>[src]</a></h4><div class='docblock'><p>Executes an automaton on the keys of this map.</p>
|
||
</div><h4 id='method.len' class="method"><code id='len.v'>pub fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#466-468' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the number of keys in this fst.</p>
|
||
</div><h4 id='method.is_empty' class="method"><code id='is_empty.v'>pub fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#472-474' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns true if and only if this fst has no keys.</p>
|
||
</div><h4 id='method.size' class="method"><code id='size.v'>pub fn <a href='#method.size' class='fnname'>size</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#478-480' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the number of bytes used by this fst.</p>
|
||
</div><h4 id='method.op' class="method"><code id='op.v'>pub fn <a href='#method.op' class='fnname'>op</a>(&self) -> <a class="struct" href="../../fst/raw/struct.OpBuilder.html" title="struct fst::raw::OpBuilder">OpBuilder</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#489-491' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new fst operation with this fst added to it.</p>
|
||
<p>The <code>OpBuilder</code> type can be used to add additional fst streams
|
||
and perform set operations like union, intersection, difference and
|
||
symmetric difference on the keys of the fst. These set operations also
|
||
allow one to specify how conflicting values are merged in the stream.</p>
|
||
</div><h4 id='method.is_disjoint' class="method"><code id='is_disjoint.v'>pub fn <a href='#method.is_disjoint' class='fnname'>is_disjoint</a><'f, I, S>(&self, stream: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</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="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>>,<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="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><a class='srclink' href='../../src/fst/raw/mod.rs.html#498-502' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns true if and only if the <code>self</code> fst is disjoint with the fst
|
||
<code>stream</code>.</p>
|
||
<p><code>stream</code> must be a lexicographically ordered sequence of byte strings
|
||
with associated values.</p>
|
||
</div><h4 id='method.is_subset' class="method"><code id='is_subset.v'>pub fn <a href='#method.is_subset' class='fnname'>is_subset</a><'f, I, S>(&self, stream: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</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="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>>,<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="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><a class='srclink' href='../../src/fst/raw/mod.rs.html#509-518' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns true if and only if the <code>self</code> fst is a subset of the fst
|
||
<code>stream</code>.</p>
|
||
<p><code>stream</code> must be a lexicographically ordered sequence of byte strings
|
||
with associated values.</p>
|
||
</div><h4 id='method.is_superset' class="method"><code id='is_superset.v'>pub fn <a href='#method.is_superset' class='fnname'>is_superset</a><'f, I, S>(&self, stream: I) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</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="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>>,<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="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><a class='srclink' href='../../src/fst/raw/mod.rs.html#525-534' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns true if and only if the <code>self</code> fst is a superset of the fst
|
||
<code>stream</code>.</p>
|
||
<p><code>stream</code> must be a lexicographically ordered sequence of byte strings
|
||
with associated values.</p>
|
||
</div><h4 id='method.fst_type' class="method"><code id='fst_type.v'>pub fn <a href='#method.fst_type' class='fnname'>fst_type</a>(&self) -> <a class="type" href="../../fst/raw/type.FstType.html" title="type fst::raw::FstType">FstType</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#544-546' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the underlying type of this fst.</p>
|
||
<p>FstType is a convention used to indicate the type of the underlying
|
||
transducer.</p>
|
||
<p>This crate reserves the range 0-255 (inclusive) but currently leaves
|
||
the meaning of 0-255 unspecified.</p>
|
||
</div><h4 id='method.root' class="method"><code id='root.v'>pub fn <a href='#method.root' class='fnname'>root</a>(&self) -> <a class="struct" href="../../fst/raw/struct.Node.html" title="struct fst::raw::Node">Node</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#550-552' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the root node of this fst.</p>
|
||
</div><h4 id='method.node' class="method"><code id='node.v'>pub fn <a href='#method.node' class='fnname'>node</a>(&self, addr: <a class="type" href="../../fst/raw/type.CompiledAddr.html" title="type fst::raw::CompiledAddr">CompiledAddr</a>) -> <a class="struct" href="../../fst/raw/struct.Node.html" title="struct fst::raw::Node">Node</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#558-560' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the node at the given address.</p>
|
||
<p>Node addresses can be obtained by reading transitions on <code>Node</code> values.</p>
|
||
</div><h4 id='method.to_vec' class="method"><code id='to_vec.v'>pub fn <a href='#method.to_vec' class='fnname'>to_vec</a>(&self) -> <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 class='srclink' href='../../src/fst/raw/mod.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a copy of the binary contents of this FST.</p>
|
||
</div><h4 id='method.as_bytes' class="method"><code id='as_bytes.v'>pub fn <a href='#method.as_bytes' class='fnname'>as_bytes</a>(&self) -> <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></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#570-572' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the binary contents of this FST.</p>
|
||
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-IntoStreamer%3C%27a%3E' class='impl'><code class='in-band'>impl<'a, 'f> <a class="trait" href="../../fst/trait.IntoStreamer.html" title="trait fst::IntoStreamer">IntoStreamer</a><'a> for &'f <a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a></code><a href='#impl-IntoStreamer%3C%27a%3E' class='anchor'></a><a class='srclink' href='../../src/fst/raw/mod.rs.html#584-592' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Item' class="type"><code id='Item.t'>type <a href='../../fst/trait.IntoStreamer.html#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></code></h4><div class='docblock'><p>The type of the item emitted by the stream.</p>
|
||
</div><h4 id='associatedtype.Into' class="type"><code id='Into.t'>type <a href='../../fst/trait.IntoStreamer.html#associatedtype.Into' class="type">Into</a> = <a class="struct" href="../../fst/raw/struct.Stream.html" title="struct fst::raw::Stream">Stream</a><'f></code></h4><div class='docblock'><p>The type of the stream to be constructed.</p>
|
||
</div><h4 id='method.into_stream' class="method hidden"><code id='into_stream.v'>fn <a href='../../fst/trait.IntoStreamer.html#tymethod.into_stream' class='fnname'>into_stream</a>(self) -> Self::<a class="type" href="../../fst/trait.IntoStreamer.html#associatedtype.Into" title="type fst::IntoStreamer::Into">Into</a></code><a class='srclink' href='../../src/fst/raw/mod.rs.html#589-591' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Construct a stream from <code>Self</code>.</p>
|
||
</div></div><h3 id='impl-From%3CFst%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a>> for <a class="struct" href="../../fst/struct.Map.html" title="struct fst::Map">Map</a></code><a href='#impl-From%3CFst%3E' class='anchor'></a><a class='srclink' href='../../src/fst/map.rs.html#396-401' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(fst: <a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a>) -> <a class="struct" href="../../fst/struct.Map.html" title="struct fst::Map">Map</a></code><a class='srclink' href='../../src/fst/map.rs.html#398-400' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-From%3CFst%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a>> for <a class="struct" href="../../fst/struct.Set.html" title="struct fst::Set">Set</a></code><a href='#impl-From%3CFst%3E-1' class='anchor'></a><a class='srclink' href='../../src/fst/set.rs.html#366-371' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(fst: <a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a>) -> <a class="struct" href="../../fst/struct.Set.html" title="struct fst::Set">Set</a></code><a class='srclink' href='../../src/fst/set.rs.html#368-370' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-AsRef%3CFst%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a>> for <a class="struct" href="../../fst/struct.Map.html" title="struct fst::Map">Map</a></code><a href='#impl-AsRef%3CFst%3E' class='anchor'></a><a class='srclink' href='../../src/fst/map.rs.html#404-409' title='goto source code'>[src]</a></h3><div class='docblock'><p>Returns the underlying finite state transducer.</p>
|
||
</div><div class='impl-items'><h4 id='method.as_ref' class="method hidden"><code id='as_ref.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&self) -> &<a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a></code><a class='srclink' href='../../src/fst/map.rs.html#406-408' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-AsRef%3CFst%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a>> for <a class="struct" href="../../fst/struct.Set.html" title="struct fst::Set">Set</a></code><a href='#impl-AsRef%3CFst%3E-1' class='anchor'></a><a class='srclink' href='../../src/fst/set.rs.html#348-353' title='goto source code'>[src]</a></h3><div class='docblock'><p>Returns the underlying finite state transducer.</p>
|
||
</div><div class='impl-items'><h4 id='method.as_ref-1' class="method hidden"><code id='as_ref.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&self) -> &<a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a></code><a class='srclink' href='../../src/fst/set.rs.html#350-352' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../fst/raw/struct.Fst.html" title="struct fst::raw::Fst">Fst</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a> for T</code><a href='#impl-From' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-2' class="method hidden"><code id='from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#547' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Into' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#537-542' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#539-541' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryFrom' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#565-571' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#568-570' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Borrow' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></div><h3 id='impl-BorrowMut' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></div><h3 id='impl-TryInto' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-560' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#557-559' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "fst";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |