]> Untitled Git - bitcoindevkit.org/blob
191ebfd4262e07cf6612dd6b188931858d866394
[bitcoindevkit.org] /
1 <!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="An index storing `TxOut`s that have a script pubkey that matches those in a list."><title>SpkTxOutIndex in bdk_chain::indexer::spk_txout - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bdk_chain" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (78a775127 2024-05-11)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../bdk_chain/index.html">bdk_chain</a><span class="version">0.16.0</span></h2></div><h2 class="location"><a href="#">SpkTxOutIndex</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.all_spks">all_spks</a></li><li><a href="#method.index_of_spk">index_of_spk</a></li><li><a href="#method.insert_spk">insert_spk</a></li><li><a href="#method.is_relevant">is_relevant</a></li><li><a href="#method.is_used">is_used</a></li><li><a href="#method.mark_used">mark_used</a></li><li><a href="#method.net_value">net_value</a></li><li><a href="#method.outpoints">outpoints</a></li><li><a href="#method.outputs_in_range">outputs_in_range</a></li><li><a href="#method.scan">scan</a></li><li><a href="#method.scan_txout">scan_txout</a></li><li><a href="#method.sent_and_received">sent_and_received</a></li><li><a href="#method.spk_at_index">spk_at_index</a></li><li><a href="#method.txout">txout</a></li><li><a href="#method.txouts">txouts</a></li><li><a href="#method.txouts_in_tx">txouts_in_tx</a></li><li><a href="#method.unmark_used">unmark_used</a></li><li><a href="#method.unused_spks">unused_spks</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-SpkTxOutIndex%3CI%3E">Clone</a></li><li><a href="#impl-Debug-for-SpkTxOutIndex%3CI%3E">Debug</a></li><li><a href="#impl-Default-for-SpkTxOutIndex%3CI%3E">Default</a></li><li><a href="#impl-Indexer-for-SpkTxOutIndex%3CI%3E">Indexer</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-SpkTxOutIndex%3CI%3E">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-SpkTxOutIndex%3CI%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-SpkTxOutIndex%3CI%3E">Send</a></li><li><a href="#impl-Sync-for-SpkTxOutIndex%3CI%3E">Sync</a></li><li><a href="#impl-Unpin-for-SpkTxOutIndex%3CI%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-SpkTxOutIndex%3CI%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-T">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into&lt;U&gt;</a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto&lt;U&gt;</a></li><li><a href="#impl-VZip%3CV%3E-for-T">VZip&lt;V&gt;</a></li></ul></section><h2><a href="index.html">In bdk_chain::indexer::spk_txout</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../../index.html">bdk_chain</a>::<wbr><a href="../index.html">indexer</a>::<wbr><a href="index.html">spk_txout</a>::<wbr><a class="struct" href="#">SpkTxOutIndex</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#32-43">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct SpkTxOutIndex&lt;I&gt; { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An index storing <a href="bitcoin::TxOut"><code>TxOut</code></a>s that have a script pubkey that matches those in a list.</p>
2 <p>The basic idea is that you insert script pubkeys you care about into the index with
3 <a href="struct.SpkTxOutIndex.html#method.insert_spk" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::insert_spk"><code>insert_spk</code></a> and then when you call <a href="../trait.Indexer.html#tymethod.index_tx" title="method bdk_chain::indexer::Indexer::index_tx"><code>Indexer::index_tx</code></a> or <a href="../trait.Indexer.html#tymethod.index_txout" title="method bdk_chain::indexer::Indexer::index_txout"><code>Indexer::index_txout</code></a>, the
4 index will look at any txouts you pass in and store and index any txouts matching one of its
5 script pubkeys.</p>
6 <p>Each script pubkey is associated with an application-defined index script index <code>I</code>, which must be
7 <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord"><code>Ord</code></a>. Usually, this is used to associate the derivation index of the script pubkey or even a
8 combination of <code>(keychain, derivation_index)</code>.</p>
9 <p>Note there is no harm in scanning transactions that disappear from the blockchain or were never
10 in there in the first place. <code>SpkTxOutIndex</code> is intentionally <em>monotone</em> – you cannot delete or
11 modify txouts that have been indexed. To find out which txouts from the index are actually in the
12 chain or unspent, you must use other sources of information like a <a href="../../tx_graph/struct.TxGraph.html" title="struct bdk_chain::tx_graph::TxGraph"><code>TxGraph</code></a>.</p>
13 </div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-SpkTxOutIndex%3CI%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#81-334">source</a><a href="#impl-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.scan" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#89-100">source</a><h4 class="code-header">pub fn <a href="#method.scan" class="fn">scan</a>(&amp;mut self, tx: &amp;Transaction) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;I&gt;</h4></section></summary><div class="docblock"><p>Scans a transaction’s outputs for matching script pubkeys.</p>
14 <p>Typically, this is used in two situations:</p>
15 <ol>
16 <li>After loading transaction data from the disk, you may scan over all the txouts to restore all
17 your txouts.</li>
18 <li>When getting new data from the chain, you usually scan it before incorporating it into your chain state.</li>
19 </ol>
20 </div></details><details class="toggle method-toggle" open><summary><section id="method.scan_txout" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#104-112">source</a><h4 class="code-header">pub fn <a href="#method.scan_txout" class="fn">scan_txout</a>(&amp;mut self, op: OutPoint, txout: &amp;TxOut) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>&gt;</h4></section></summary><div class="docblock"><p>Scan a single <code>TxOut</code> for a matching script pubkey and returns the index that matches the
21 script pubkey (if any).</p>
22 </div></details><details class="toggle method-toggle" open><summary><section id="method.outpoints" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#115-117">source</a><h4 class="code-header">pub fn <a href="#method.outpoints" class="fn">outpoints</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;(I, OutPoint)&gt;</h4></section></summary><div class="docblock"><p>Get a reference to the set of indexed outpoints.</p>
23 </div></details><details class="toggle method-toggle" open><summary><section id="method.txouts" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#120-126">source</a><h4 class="code-header">pub fn <a href="#method.txouts" class="fn">txouts</a>(
24 &amp;self
25 ) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>&lt;Item = (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>, OutPoint, &amp;TxOut)&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/exact_size/trait.ExactSizeIterator.html" title="trait core::iter::traits::exact_size::ExactSizeIterator">ExactSizeIterator</a></h4></section></summary><div class="docblock"><p>Iterate over all known txouts that spend to tracked script pubkeys.</p>
26 </div></details><details class="toggle method-toggle" open><summary><section id="method.txouts_in_tx" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#129-136">source</a><h4 class="code-header">pub fn <a href="#method.txouts_in_tx" class="fn">txouts_in_tx</a>(
27 &amp;self,
28 txid: Txid
29 ) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>&lt;Item = (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>, OutPoint, &amp;TxOut)&gt;</h4></section></summary><div class="docblock"><p>Finds all txouts on a transaction that has previously been scanned and indexed.</p>
30 </div></details><details class="toggle method-toggle" open><summary><section id="method.outputs_in_range" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#139-167">source</a><h4 class="code-header">pub fn <a href="#method.outputs_in_range" class="fn">outputs_in_range</a>(
31 &amp;self,
32 range: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;I&gt;
33 ) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>&lt;Item = (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>, OutPoint)&gt;</h4></section></summary><div class="docblock"><p>Iterates over all the outputs with script pubkeys in an index range.</p>
34 </div></details><details class="toggle method-toggle" open><summary><section id="method.txout" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#172-174">source</a><h4 class="code-header">pub fn <a href="#method.txout" class="fn">txout</a>(&amp;self, outpoint: OutPoint) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>, &amp;TxOut)&gt;</h4></section></summary><div class="docblock"><p>Returns the txout and script pubkey index of the <code>TxOut</code> at <code>OutPoint</code>.</p>
35 <p>Returns <code>None</code> if the <code>TxOut</code> hasn’t been scanned or if nothing matching was found there.</p>
36 </div></details><details class="toggle method-toggle" open><summary><section id="method.spk_at_index" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#179-181">source</a><h4 class="code-header">pub fn <a href="#method.spk_at_index" class="fn">spk_at_index</a>(&amp;self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;Script&gt;</h4></section></summary><div class="docblock"><p>Returns the script that has been inserted at the <code>index</code>.</p>
37 <p>If that index hasn’t been inserted yet, it will return <code>None</code>.</p>
38 </div></details><details class="toggle method-toggle" open><summary><section id="method.all_spks" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#184-186">source</a><h4 class="code-header">pub fn <a href="#method.all_spks" class="fn">all_spks</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;I, ScriptBuf&gt;</h4></section></summary><div class="docblock"><p>The script pubkeys that are being tracked by the index.</p>
39 </div></details><details class="toggle method-toggle" open><summary><section id="method.insert_spk" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#191-201">source</a><h4 class="code-header">pub fn <a href="#method.insert_spk" class="fn">insert_spk</a>(&amp;mut self, index: I, spk: ScriptBuf) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Adds a script pubkey to scan for. Returns <code>false</code> and does nothing if spk already exists in the map</p>
40 <p>the index will look for outputs spending to this spk whenever it scans new data.</p>
41 </div></details><details class="toggle method-toggle" open><summary><section id="method.unused_spks" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#220-227">source</a><h4 class="code-header">pub fn <a href="#method.unused_spks" class="fn">unused_spks</a>&lt;R&gt;(
42 &amp;self,
43 range: R
44 ) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html" title="trait core::iter::traits::double_ended::DoubleEndedIterator">DoubleEndedIterator</a>&lt;Item = (<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>, &amp;Script)&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a><div class="where">where
45 R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;I&gt;,</div></h4></section></summary><div class="docblock"><p>Iterates over all unused script pubkeys in an index range.</p>
46 <p>Here, “unused” means that after the script pubkey was stored in the index, the index has
47 never scanned a transaction output with it.</p>
48 <h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5>
49 <div class="example-wrap"><pre class="rust rust-example-rendered"><code>
50 <span class="comment">// imagine our spks are indexed like (keychain, derivation_index).
51 </span><span class="kw">let </span>txout_index = SpkTxOutIndex::&lt;(u32, u32)&gt;::default();
52 <span class="kw">let </span>all_unused_spks = txout_index.unused_spks(..);
53 <span class="kw">let </span>change_index = <span class="number">1</span>;
54 <span class="kw">let </span>unused_change_spks =
55 txout_index.unused_spks((change_index, u32::MIN)..(change_index, u32::MAX));</code></pre></div>
56 </div></details><details class="toggle method-toggle" open><summary><section id="method.is_used" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#233-235">source</a><h4 class="code-header">pub fn <a href="#method.is_used" class="fn">is_used</a>(&amp;self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns whether the script pubkey at <code>index</code> has been used or not.</p>
57 <p>Here, “unused” means that after the script pubkey was stored in the index, the index has
58 never scanned a transaction output with it.</p>
59 </div></details><details class="toggle method-toggle" open><summary><section id="method.mark_used" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#247-249">source</a><h4 class="code-header">pub fn <a href="#method.mark_used" class="fn">mark_used</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Marks the script pubkey at <code>index</code> as used even though it hasn’t seen an output spending to it.
60 This only affects when the <code>index</code> had already been added to <code>self</code> and was unused.</p>
61 <p>Returns whether the <code>index</code> was initially present as <code>unused</code>.</p>
62 <p>This is useful when you want to reserve a script pubkey for something but don’t want to add
63 the transaction output using it to the index yet. Other callers will consider the <code>index</code> used
64 until you call <a href="struct.SpkTxOutIndex.html#method.unmark_used" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::unmark_used"><code>unmark_used</code></a>.</p>
65 </div></details><details class="toggle method-toggle" open><summary><section id="method.unmark_used" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#258-268">source</a><h4 class="code-header">pub fn <a href="#method.unmark_used" class="fn">unmark_used</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Undoes the effect of <a href="struct.SpkTxOutIndex.html#method.mark_used" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::mark_used"><code>mark_used</code></a>. Returns whether the <code>index</code> is inserted back into
66 <code>unused</code>.</p>
67 <p>Note that if <code>self</code> has scanned an output with this script pubkey then this will have no
68 effect.</p>
69 </div></details><details class="toggle method-toggle" open><summary><section id="method.index_of_spk" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#271-273">source</a><h4 class="code-header">pub fn <a href="#method.index_of_spk" class="fn">index_of_spk</a>(&amp;self, script: &amp;Script) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;I</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the index associated with the script pubkey.</p>
70 </div></details><details class="toggle method-toggle" open><summary><section id="method.sent_and_received" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#280-304">source</a><h4 class="code-header">pub fn <a href="#method.sent_and_received" class="fn">sent_and_received</a>(
71 &amp;self,
72 tx: &amp;Transaction,
73 range: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;I&gt;
74 ) -&gt; (Amount, Amount)</h4></section></summary><div class="docblock"><p>Computes the total value transfer effect <code>tx</code> has on the script pubkeys in <code>range</code>. Value is
75 <em>sent</em> when a script pubkey in the <code>range</code> is on an input and <em>received</em> when it is on an
76 output. For <code>sent</code> to be computed correctly, the output being spent must have already been
77 scanned by the index. Calculating received just uses the [<code>Transaction</code>] outputs directly,
78 so it will be correct even if it has not been scanned.</p>
79 </div></details><details class="toggle method-toggle" open><summary><section id="method.net_value" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#310-314">source</a><h4 class="code-header">pub fn <a href="#method.net_value" class="fn">net_value</a>(
80 &amp;self,
81 tx: &amp;Transaction,
82 range: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a>&lt;I&gt;
83 ) -&gt; SignedAmount</h4></section></summary><div class="docblock"><p>Computes the net value transfer effect of <code>tx</code> on the script pubkeys in <code>range</code>. Shorthand
84 for calling <a href="struct.SpkTxOutIndex.html#method.sent_and_received" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::sent_and_received"><code>sent_and_received</code></a> and subtracting sent from received.</p>
85 </div></details><details class="toggle method-toggle" open><summary><section id="method.is_relevant" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#323-333">source</a><h4 class="code-header">pub fn <a href="#method.is_relevant" class="fn">is_relevant</a>(&amp;self, tx: &amp;Transaction) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether any of the inputs of this transaction spend a txout tracked or whether any output
86 matches one of our script pubkeys.</p>
87 <p>It is easily possible to misuse this method and get false negatives by calling it before you
88 have scanned the <code>TxOut</code>s the transaction is spending. For example, if you want to filter out
89 all the transactions in a block that are irrelevant, you <strong>must first scan all the
90 transactions in the block</strong> and only then use this method.</p>
91 </div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-SpkTxOutIndex%3CI%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#31">source</a><a href="#impl-Clone-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#31">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-SpkTxOutIndex%3CI%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#31">source</a><a href="#impl-Debug-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#31">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-SpkTxOutIndex%3CI%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#45-55">source</a><a href="#impl-Default-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#46-54">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -&gt; Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Indexer-for-SpkTxOutIndex%3CI%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#57-79">source</a><a href="#impl-Indexer-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>&gt; <a class="trait" href="../trait.Indexer.html" title="trait bdk_chain::indexer::Indexer">Indexer</a> for <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.ChangeSet" class="associatedtype trait-impl"><a href="#associatedtype.ChangeSet" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Indexer.html#associatedtype.ChangeSet" class="associatedtype">ChangeSet</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section></summary><div class='docblock'>The resultant “changeset” when new transaction data is indexed.</div></details><details class="toggle method-toggle" open><summary><section id="method.index_txout" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#60-63">source</a><a href="#method.index_txout" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Indexer.html#tymethod.index_txout" class="fn">index_txout</a>(&amp;mut self, outpoint: OutPoint, txout: &amp;TxOut) -&gt; Self::<a class="associatedtype" href="../trait.Indexer.html#associatedtype.ChangeSet" title="type bdk_chain::indexer::Indexer::ChangeSet">ChangeSet</a></h4></section></summary><div class='docblock'>Scan and index the given <code>outpoint</code> and <code>txout</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.index_tx" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#65-68">source</a><a href="#method.index_tx" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Indexer.html#tymethod.index_tx" class="fn">index_tx</a>(&amp;mut self, tx: &amp;Transaction) -&gt; Self::<a class="associatedtype" href="../trait.Indexer.html#associatedtype.ChangeSet" title="type bdk_chain::indexer::Indexer::ChangeSet">ChangeSet</a></h4></section></summary><div class='docblock'>Scans a transaction for relevant outpoints, which are stored and indexed internally.</div></details><details class="toggle method-toggle" open><summary><section id="method.initial_changeset" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#70">source</a><a href="#method.initial_changeset" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Indexer.html#tymethod.initial_changeset" class="fn">initial_changeset</a>(&amp;self) -&gt; Self::<a class="associatedtype" href="../trait.Indexer.html#associatedtype.ChangeSet" title="type bdk_chain::indexer::Indexer::ChangeSet">ChangeSet</a></h4></section></summary><div class='docblock'>Determines the <a href="../trait.Indexer.html#associatedtype.ChangeSet" title="associated type bdk_chain::indexer::Indexer::ChangeSet"><code>ChangeSet</code></a> between <code>self</code> and an empty <a href="../trait.Indexer.html" title="trait bdk_chain::indexer::Indexer"><code>Indexer</code></a>.</div></details><details class="toggle method-toggle" open><summary><section id="method.apply_changeset" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#72-74">source</a><a href="#method.apply_changeset" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Indexer.html#tymethod.apply_changeset" class="fn">apply_changeset</a>(&amp;mut self, _changeset: Self::<a class="associatedtype" href="../trait.Indexer.html#associatedtype.ChangeSet" title="type bdk_chain::indexer::Indexer::ChangeSet">ChangeSet</a>)</h4></section></summary><div class='docblock'>Apply changeset to itself.</div></details><details class="toggle method-toggle" open><summary><section id="method.is_tx_relevant" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/spk_txout.rs.html#76-78">source</a><a href="#method.is_tx_relevant" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Indexer.html#tymethod.is_tx_relevant" class="fn">is_tx_relevant</a>(&amp;self, tx: &amp;Transaction) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Determines whether the transaction should be included in the index.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-SpkTxOutIndex%3CI%3E" class="impl"><a href="#impl-Freeze-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;</h3></section><section id="impl-RefUnwindSafe-for-SpkTxOutIndex%3CI%3E" class="impl"><a href="#impl-RefUnwindSafe-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;<div class="where">where
92 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</div></h3></section><section id="impl-Send-for-SpkTxOutIndex%3CI%3E" class="impl"><a href="#impl-Send-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&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="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;<div class="where">where
93 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section><section id="impl-Sync-for-SpkTxOutIndex%3CI%3E" class="impl"><a href="#impl-Sync-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&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="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;<div class="where">where
94 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section><section id="impl-Unpin-for-SpkTxOutIndex%3CI%3E" class="impl"><a href="#impl-Unpin-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;<div class="where">where
95 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnwindSafe-for-SpkTxOutIndex%3CI%3E" class="impl"><a href="#impl-UnwindSafe-for-SpkTxOutIndex%3CI%3E" class="anchor">§</a><h3 class="code-header">impl&lt;I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a>&lt;I&gt;<div class="where">where
96 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</div></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
97 T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>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></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
98 T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
99 T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>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></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
100 </div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
101 U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#758">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
102 <p>That is, this conversion is whatever the implementation of
103 <code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
104 </div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
105 T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
106 U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
107 U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#797">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-T" class="impl"><a href="#impl-VZip%3CV%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;V, T&gt; VZip&lt;V&gt; for T<div class="where">where
108 V: MultiLane&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl"><a href="#method.vzip" class="anchor">§</a><h4 class="code-header">fn <a class="fn">vzip</a>(self) -&gt; V</h4></section></div></details></div></section></div></main></body></html>