]> Untitled Git - bitcoindevkit.org/blob
74cd734d8aaff88761f78d900c0b0c68e5b4ffbf
[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="`KeychainTxOutIndex` controls how script pubkeys are revealed for multiple keychains, and indexes `TxOut`s with them."><title>KeychainTxOutIndex in bdk_chain::indexer::keychain_txout - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-46132b98.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.85.0-nightly (4363f9b6f 2025-01-02)" data-channel="nightly" data-search-js="search-75f5ac3e.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.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><a class="logo-container" href="../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><h2><a href="../../../bdk_chain/index.html">bdk_<wbr>chain</a><span class="version">0.21.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Keychain<wbr>TxOut<wbr>Index</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#revealed-script-pubkeys" title="Revealed script pubkeys">Revealed script pubkeys</a></li><li><a href="#lookahead-script-pubkeys" title="Lookahead script pubkeys">Lookahead script pubkeys</a></li><li><a href="#unbounded-script-pubkey-iterator" title="Unbounded script pubkey iterator">Unbounded script pubkey iterator</a></li><li><a href="#change-sets" title="Change sets">Change sets</a><ul><li><a href="#synopsis" title="Synopsis">Synopsis</a></li></ul></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.all_unbounded_spk_iters" title="all_unbounded_spk_iters">all_unbounded_spk_iters</a></li><li><a href="#method.apply_changeset" title="apply_changeset">apply_changeset</a></li><li><a href="#method.get_descriptor" title="get_descriptor">get_descriptor</a></li><li><a href="#method.index_of_spk" title="index_of_spk">index_of_spk</a></li><li><a href="#method.insert_descriptor" title="insert_descriptor">insert_descriptor</a></li><li><a href="#method.is_used" title="is_used">is_used</a></li><li><a href="#method.keychain_outpoints" title="keychain_outpoints">keychain_outpoints</a></li><li><a href="#method.keychain_outpoints_in_range" title="keychain_outpoints_in_range">keychain_outpoints_in_range</a></li><li><a href="#method.keychains" title="keychains">keychains</a></li><li><a href="#method.last_revealed_index" title="last_revealed_index">last_revealed_index</a></li><li><a href="#method.last_revealed_indices" title="last_revealed_indices">last_revealed_indices</a></li><li><a href="#method.last_used_index" title="last_used_index">last_used_index</a></li><li><a href="#method.last_used_indices" title="last_used_indices">last_used_indices</a></li><li><a href="#method.lookahead" title="lookahead">lookahead</a></li><li><a href="#method.lookahead_to_target" title="lookahead_to_target">lookahead_to_target</a></li><li><a href="#method.mark_used" title="mark_used">mark_used</a></li><li><a href="#method.net_value" title="net_value">net_value</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.next_index" title="next_index">next_index</a></li><li><a href="#method.next_unused_spk" title="next_unused_spk">next_unused_spk</a></li><li><a href="#method.outpoints" title="outpoints">outpoints</a></li><li><a href="#method.reveal_next_spk" title="reveal_next_spk">reveal_next_spk</a></li><li><a href="#method.reveal_to_target" title="reveal_to_target">reveal_to_target</a></li><li><a href="#method.reveal_to_target_multi" title="reveal_to_target_multi">reveal_to_target_multi</a></li><li><a href="#method.revealed_keychain_spks" title="revealed_keychain_spks">revealed_keychain_spks</a></li><li><a href="#method.revealed_spks" title="revealed_spks">revealed_spks</a></li><li><a href="#method.sent_and_received" title="sent_and_received">sent_and_received</a></li><li><a href="#method.spk_at_index" title="spk_at_index">spk_at_index</a></li><li><a href="#method.txout" title="txout">txout</a></li><li><a href="#method.txouts" title="txouts">txouts</a></li><li><a href="#method.txouts_in_tx" title="txouts_in_tx">txouts_in_tx</a></li><li><a href="#method.unbounded_spk_iter" title="unbounded_spk_iter">unbounded_spk_iter</a></li><li><a href="#method.unmark_used" title="unmark_used">unmark_used</a></li><li><a href="#method.unused_keychain_spks" title="unused_keychain_spks">unused_keychain_spks</a></li><li><a href="#method.unused_spks" title="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-KeychainTxOutIndex%3CK%3E" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-KeychainTxOutIndex%3CK%3E" title="Debug">Debug</a></li><li><a href="#impl-Default-for-KeychainTxOutIndex%3CK%3E" title="Default">Default</a></li><li><a href="#impl-Indexer-for-KeychainTxOutIndex%3CK%3E" title="Indexer">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-KeychainTxOutIndex%3CK%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-KeychainTxOutIndex%3CK%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-KeychainTxOutIndex%3CK%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-KeychainTxOutIndex%3CK%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-KeychainTxOutIndex%3CK%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-KeychainTxOutIndex%3CK%3E" title="UnwindSafe">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" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li><li><a href="#impl-VZip%3CV%3E-for-T" title="VZip&#60;V&#62;">VZip&#60;V&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In bdk_<wbr>chain::<wbr>indexer::<wbr>keychain_<wbr>txout</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../../index.html">bdk_chain</a>::<wbr><a href="../index.html">indexer</a>::<wbr><a href="index.html">keychain_txout</a></span><h1>Struct <span class="struct">KeychainTxOutIndex</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#124-131">Source</a> </span></div><pre class="rust item-decl"><code>pub struct KeychainTxOutIndex&lt;K&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><a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex"><code>KeychainTxOutIndex</code></a> controls how script pubkeys are revealed for multiple keychains, and
2 indexes <a href="../../bitcoin/struct.TxOut.html" title="struct bdk_chain::bitcoin::TxOut"><code>TxOut</code></a>s with them.</p>
3 <p>A single keychain is a chain of script pubkeys derived from a single <a href="crate::miniscript::Descriptor"><code>Descriptor</code></a>. Keychains
4 are identified using the <code>K</code> generic. Script pubkeys are identified by the keychain that they
5 are derived from <code>K</code>, as well as the derivation index <code>u32</code>.</p>
6 <p>There is a strict 1-to-1 relationship between descriptors and keychains. Each keychain has one
7 and only one descriptor and each descriptor has one and only one keychain. The
8 <a href="struct.KeychainTxOutIndex.html#method.insert_descriptor" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::insert_descriptor"><code>insert_descriptor</code></a> method will return an error if you try and violate this invariant. This
9 rule is a proxy for a stronger rule: no two descriptors should produce the same script pubkey.
10 Having two descriptors produce the same script pubkey should cause whichever keychain derives
11 the script pubkey first to be the effective owner of it but you should not rely on this
12 behaviour. ⚠ It is up you, the developer, not to violate this invariant.</p>
13 <h2 id="revealed-script-pubkeys"><a class="doc-anchor" href="#revealed-script-pubkeys">§</a>Revealed script pubkeys</h2>
14 <p>Tracking how script pubkeys are revealed is useful for collecting chain data. For example, if
15 the user has requested 5 script pubkeys (to receive money with), we only need to use those
16 script pubkeys to scan for chain data.</p>
17 <p>Call <a href="struct.KeychainTxOutIndex.html#method.reveal_to_target" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::reveal_to_target"><code>reveal_to_target</code></a> or <a href="struct.KeychainTxOutIndex.html#method.reveal_next_spk" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::reveal_next_spk"><code>reveal_next_spk</code></a> to reveal more script pubkeys.
18 Call <a href="struct.KeychainTxOutIndex.html#method.revealed_keychain_spks" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::revealed_keychain_spks"><code>revealed_keychain_spks</code></a> or <a href="struct.KeychainTxOutIndex.html#method.revealed_spks" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::revealed_spks"><code>revealed_spks</code></a> to iterate through revealed script pubkeys.</p>
19 <h2 id="lookahead-script-pubkeys"><a class="doc-anchor" href="#lookahead-script-pubkeys">§</a>Lookahead script pubkeys</h2>
20 <p>When an user first recovers a wallet (i.e. from a recovery phrase and/or descriptor), we will
21 NOT have knowledge of which script pubkeys are revealed. So when we index a transaction or
22 txout (using <a href="struct.KeychainTxOutIndex.html#method.index_tx" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::index_tx"><code>index_tx</code></a>/<a href="struct.KeychainTxOutIndex.html#method.index_txout" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::index_txout"><code>index_txout</code></a>) we scan the txouts against script pubkeys derived
23 above the last revealed index. These additionally-derived script pubkeys are called the
24 lookahead.</p>
25 <p>The <a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex"><code>KeychainTxOutIndex</code></a> is constructed with the <code>lookahead</code> and cannot be altered. See
26 <a href="constant.DEFAULT_LOOKAHEAD.html" title="constant bdk_chain::indexer::keychain_txout::DEFAULT_LOOKAHEAD"><code>DEFAULT_LOOKAHEAD</code></a> for the value used in the <code>Default</code> implementation. Use <a href="struct.KeychainTxOutIndex.html#method.new" title="associated function bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::new"><code>new</code></a> to set a
27 custom <code>lookahead</code>.</p>
28 <h2 id="unbounded-script-pubkey-iterator"><a class="doc-anchor" href="#unbounded-script-pubkey-iterator">§</a>Unbounded script pubkey iterator</h2>
29 <p>For script-pubkey-based chain sources (such as Electrum/Esplora), an initial scan is best done
30 by iterating though derived script pubkeys one by one and requesting transaction histories for
31 each script pubkey. We will stop after x-number of script pubkeys have empty histories. An
32 unbounded script pubkey iterator is useful to pass to such a chain source because it doesn’t
33 require holding a reference to the index.</p>
34 <p>Call <a href="struct.KeychainTxOutIndex.html#method.unbounded_spk_iter" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::unbounded_spk_iter"><code>unbounded_spk_iter</code></a> to get an unbounded script pubkey iterator for a given keychain.
35 Call <a href="struct.KeychainTxOutIndex.html#method.all_unbounded_spk_iters" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::all_unbounded_spk_iters"><code>all_unbounded_spk_iters</code></a> to get unbounded script pubkey iterators for all keychains.</p>
36 <h2 id="change-sets"><a class="doc-anchor" href="#change-sets">§</a>Change sets</h2>
37 <p>Methods that can update the last revealed index or add keychains will return <a href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet"><code>ChangeSet</code></a> to report
38 these changes. This should be persisted for future recovery.</p>
39 <h3 id="synopsis"><a class="doc-anchor" href="#synopsis">§</a>Synopsis</h3>
40 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bdk_chain::indexer::keychain_txout::KeychainTxOutIndex;
41
42 <span class="comment">// imagine our service has internal and external addresses but also addresses for users
43 </span><span class="attr">#[derive(Clone, Debug, PartialEq, Eq, Ord, PartialOrd)]
44 </span><span class="kw">enum </span>MyKeychain {
45 External,
46 Internal,
47 MyAppUser {
48 user_id: u32
49 }
50 }
51
52 <span class="kw">let </span><span class="kw-2">mut </span>txout_index = KeychainTxOutIndex::&lt;MyKeychain&gt;::default();
53
54 <span class="kw">let _ </span>= txout_index.insert_descriptor(MyKeychain::External, external_descriptor)<span class="question-mark">?</span>;
55 <span class="kw">let _ </span>= txout_index.insert_descriptor(MyKeychain::Internal, internal_descriptor)<span class="question-mark">?</span>;
56 <span class="kw">let _ </span>= txout_index.insert_descriptor(MyKeychain::MyAppUser { user_id: <span class="number">42 </span>}, descriptor_42)<span class="question-mark">?</span>;
57
58 <span class="kw">let </span>new_spk_for_user = txout_index.reveal_next_spk(MyKeychain::MyAppUser{ user_id: <span class="number">42 </span>});</code></pre></div>
59 </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-KeychainTxOutIndex%3CK%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#182-203">Source</a><a href="#impl-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&gt; <a class="struct" href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#193-202">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(lookahead: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Construct a <a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex"><code>KeychainTxOutIndex</code></a> with the given <code>lookahead</code>.</p>
60 <p>The <code>lookahead</code> is the number of script pubkeys to derive and cache from the internal
61 descriptors over and above the last revealed script index. Without a lookahead the index
62 will miss outputs you own when processing transactions whose output script pubkeys lie
63 beyond the last revealed index. In certain situations, such as when performing an initial
64 scan of the blockchain during wallet import, it may be uncertain or unknown what the index
65 of the last revealed script pubkey actually is.</p>
66 <p>Refer to <a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">struct-level docs</a> for more about <code>lookahead</code>.</p>
67 </div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-KeychainTxOutIndex%3CK%3E-1" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#206-325">Source</a><a href="#impl-KeychainTxOutIndex%3CK%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;K: <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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;</h3><div class="docblock"><p>Methods that are <em>re-exposed</em> from the internal <a href="../spk_txout/struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex"><code>SpkTxOutIndex</code></a>.</p>
68 </div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.outpoints" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#208-210">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;<a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a>&lt;K, <a class="struct" href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint">OutPoint</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Get the set of indexed outpoints, corresponding to tracked keychains.</p>
69 </div></details><details class="toggle method-toggle" open><summary><section id="method.txouts" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#213-220">Source</a><h4 class="code-header">pub fn <a href="#method.txouts" class="fn">txouts</a>(
70 &amp;self,
71 ) -&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="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a>&lt;K, (<a class="struct" href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint">OutPoint</a>, &amp;<a class="struct" href="../../bitcoin/struct.TxOut.html" title="struct bdk_chain::bitcoin::TxOut">TxOut</a>)&gt;&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 known txouts that spend to tracked script pubkeys.</p>
72 </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/keychain_txout.rs.html#223-230">Source</a><h4 class="code-header">pub fn <a href="#method.txouts_in_tx" class="fn">txouts_in_tx</a>(
73 &amp;self,
74 txid: <a class="struct" href="../../bitcoin/struct.Txid.html" title="struct bdk_chain::bitcoin::Txid">Txid</a>,
75 ) -&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="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a>&lt;K, (<a class="struct" href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint">OutPoint</a>, &amp;<a class="struct" href="../../bitcoin/struct.TxOut.html" title="struct bdk_chain::bitcoin::TxOut">TxOut</a>)&gt;&gt;</h4></section></summary><div class="docblock"><p>Finds all txouts on a transaction that has previously been scanned and indexed.</p>
76 </div></details><details class="toggle method-toggle" open><summary><section id="method.txout" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#238-242">Source</a><h4 class="code-header">pub fn <a href="#method.txout" class="fn">txout</a>(&amp;self, outpoint: <a class="struct" href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint">OutPoint</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;<a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a>&lt;K, &amp;<a class="struct" href="../../bitcoin/struct.TxOut.html" title="struct bdk_chain::bitcoin::TxOut">TxOut</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Return the <a href="../../bitcoin/struct.TxOut.html" title="struct bdk_chain::bitcoin::TxOut"><code>TxOut</code></a> of <code>outpoint</code> if it has been indexed, and if it corresponds to a
77 tracked keychain.</p>
78 <p>The associated keychain and keychain index of the txout’s spk is also returned.</p>
79 <p>This calls <a href="../spk_txout/struct.SpkTxOutIndex.html#method.txout" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::txout"><code>SpkTxOutIndex::txout</code></a> internally.</p>
80 </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/keychain_txout.rs.html#247-249">Source</a><h4 class="code-header">pub fn <a href="#method.spk_at_index" class="fn">spk_at_index</a>(&amp;self, keychain: K, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</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;<a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</a>&gt;</h4></section></summary><div class="docblock"><p>Return the script that exists under the given <code>keychain</code>’s <code>index</code>.</p>
81 <p>This calls <a href="../spk_txout/struct.SpkTxOutIndex.html#method.spk_at_index" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::spk_at_index"><code>SpkTxOutIndex::spk_at_index</code></a> internally.</p>
82 </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/keychain_txout.rs.html#254-256">Source</a><h4 class="code-header">pub fn <a href="#method.index_of_spk" class="fn">index_of_spk</a>(&amp;self, script: <a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</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;(K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)&gt;</h4></section></summary><div class="docblock"><p>Returns the keychain and keychain index associated with the spk.</p>
83 <p>This calls <a href="../spk_txout/struct.SpkTxOutIndex.html#method.index_of_spk" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::index_of_spk"><code>SpkTxOutIndex::index_of_spk</code></a> internally.</p>
84 </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/keychain_txout.rs.html#264-266">Source</a><h4 class="code-header">pub fn <a href="#method.is_used" class="fn">is_used</a>(&amp;self, keychain: K, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</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 spk under the <code>keychain</code>’s <code>index</code> has been used.</p>
85 <p>Here, “unused” means that after the script pubkey was stored in the index, the index has
86 never scanned a transaction output with it.</p>
87 <p>This calls <a href="../spk_txout/struct.SpkTxOutIndex.html#method.is_used" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::is_used"><code>SpkTxOutIndex::is_used</code></a> internally.</p>
88 </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/keychain_txout.rs.html#284-286">Source</a><h4 class="code-header">pub fn <a href="#method.mark_used" class="fn">mark_used</a>(&amp;mut self, keychain: K, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</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 the tracker hasn’t seen an output
89 with it.</p>
90 <p>This only has an effect when the <code>index</code> had been added to <code>self</code> already and was unused.</p>
91 <p>Returns whether the spk under the given <code>keychain</code> and <code>index</code> is successfully
92 marked as used. Returns false either when there is no descriptor under the given
93 keychain, or when the spk is already marked as used.</p>
94 <p>This is useful when you want to reserve a script pubkey for something but don’t want to add
95 the transaction output using it to the index yet. Other callers will consider <code>index</code> on
96 <code>keychain</code> used until you call <a href="struct.KeychainTxOutIndex.html#method.unmark_used" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::unmark_used"><code>unmark_used</code></a>.</p>
97 <p>This calls <a href="../spk_txout/struct.SpkTxOutIndex.html#method.mark_used" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::mark_used"><code>SpkTxOutIndex::mark_used</code></a> internally.</p>
98 </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/keychain_txout.rs.html#297-299">Source</a><h4 class="code-header">pub fn <a href="#method.unmark_used" class="fn">unmark_used</a>(&amp;mut self, keychain: K, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</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.KeychainTxOutIndex.html#method.mark_used" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::mark_used"><code>mark_used</code></a>. Returns whether the <code>index</code> is inserted back into
99 <code>unused</code>.</p>
100 <p>Note that if <code>self</code> has scanned an output with this script pubkey, then this will have no
101 effect.</p>
102 <p>This calls <a href="../spk_txout/struct.SpkTxOutIndex.html#method.unmark_used" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::unmark_used"><code>SpkTxOutIndex::unmark_used</code></a> internally.</p>
103 </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/keychain_txout.rs.html#306-313">Source</a><h4 class="code-header">pub fn <a href="#method.sent_and_received" class="fn">sent_and_received</a>(
104 &amp;self,
105 tx: &amp;<a class="struct" href="../../bitcoin/struct.Transaction.html" title="struct bdk_chain::bitcoin::Transaction">Transaction</a>,
106 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;K&gt;,
107 ) -&gt; (<a class="struct" href="../../bitcoin/struct.Amount.html" title="struct bdk_chain::bitcoin::Amount">Amount</a>, <a class="struct" href="../../bitcoin/struct.Amount.html" title="struct bdk_chain::bitcoin::Amount">Amount</a>)</h4></section></summary><div class="docblock"><p>Computes the total value transfer effect <code>tx</code> has on the script pubkeys belonging to the
108 keychains in <code>range</code>. Value is <em>sent</em> when a script pubkey in the <code>range</code> is on an input and
109 <em>received</em> when it is on an output. For <code>sent</code> to be computed correctly, the output being
110 spent must have already been scanned by the index. Calculating received just uses the
111 <a href="../../bitcoin/struct.Transaction.html" title="struct bdk_chain::bitcoin::Transaction"><code>Transaction</code></a> outputs directly, so it will be correct even if it has not been scanned.</p>
112 </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/keychain_txout.rs.html#322-324">Source</a><h4 class="code-header">pub fn <a href="#method.net_value" class="fn">net_value</a>(
113 &amp;self,
114 tx: &amp;<a class="struct" href="../../bitcoin/struct.Transaction.html" title="struct bdk_chain::bitcoin::Transaction">Transaction</a>,
115 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;K&gt;,
116 ) -&gt; <a class="struct" href="../../bitcoin/struct.SignedAmount.html" title="struct bdk_chain::bitcoin::SignedAmount">SignedAmount</a></h4></section></summary><div class="docblock"><p>Computes the net value that this transaction gives to the script pubkeys in the index and
117 <em>takes</em> from the transaction outputs in the index. Shorthand for calling
118 <a href="struct.KeychainTxOutIndex.html#method.sent_and_received" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::sent_and_received"><code>sent_and_received</code></a> and subtracting sent from received.</p>
119 <p>This calls <a href="../spk_txout/struct.SpkTxOutIndex.html#method.net_value" title="method bdk_chain::indexer::spk_txout::SpkTxOutIndex::net_value"><code>SpkTxOutIndex::net_value</code></a> internally.</p>
120 </div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-KeychainTxOutIndex%3CK%3E-2" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#327-777">Source</a><a href="#impl-KeychainTxOutIndex%3CK%3E-2" class="anchor">§</a><h3 class="code-header">impl&lt;K: <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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.keychains" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#329-336">Source</a><h4 class="code-header">pub fn <a href="#method.keychains" class="fn">keychains</a>(
121 &amp;self,
122 ) -&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 = (K, &amp;Descriptor&lt;DescriptorPublicKey&gt;)&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>Return all keychains and their corresponding descriptors.</p>
123 </div></details><details class="toggle method-toggle" open><summary><section id="method.insert_descriptor" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#353-391">Source</a><h4 class="code-header">pub fn <a href="#method.insert_descriptor" class="fn">insert_descriptor</a>(
124 &amp;mut self,
125 keychain: K,
126 descriptor: Descriptor&lt;DescriptorPublicKey&gt;,
127 ) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="enum" href="enum.InsertDescriptorError.html" title="enum bdk_chain::indexer::keychain_txout::InsertDescriptorError">InsertDescriptorError</a>&lt;K&gt;&gt;</h4></section></summary><div class="docblock"><p>Insert a descriptor with a keychain associated to it.</p>
128 <p>Adding a descriptor means you will be able to derive new script pubkeys under it and the
129 txout index will discover transaction outputs with those script pubkeys (once they’ve been
130 derived and added to the index).</p>
131 <p>keychain &lt;-&gt; descriptor is a one-to-one mapping that cannot be changed. Attempting to do so
132 will return a <a href="enum.InsertDescriptorError.html" title="enum bdk_chain::indexer::keychain_txout::InsertDescriptorError"><code>InsertDescriptorError&lt;K&gt;</code></a>.</p>
133 <p><a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex"><code>KeychainTxOutIndex</code></a> will prevent you from inserting two descriptors which derive the same
134 script pubkey at index 0, but it’s up to you to ensure that descriptors don’t collide at
135 other indices. If they do nothing catastrophic happens at the <code>KeychainTxOutIndex</code> level
136 (one keychain just becomes the defacto owner of that spk arbitrarily) but this may have
137 subtle implications up the application stack like one UTXO being missing from one keychain
138 because it has been assigned to another which produces the same script pubkey.</p>
139 </div></details><details class="toggle method-toggle" open><summary><section id="method.get_descriptor" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#395-398">Source</a><h4 class="code-header">pub fn <a href="#method.get_descriptor" class="fn">get_descriptor</a>(
140 &amp;self,
141 keychain: K,
142 ) -&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;Descriptor&lt;DescriptorPublicKey&gt;&gt;</h4></section></summary><div class="docblock"><p>Gets the descriptor associated with the keychain. Returns <code>None</code> if the keychain doesn’t
143 have a descriptor associated with it.</p>
144 </div></details><details class="toggle method-toggle" open><summary><section id="method.lookahead" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#405-407">Source</a><h4 class="code-header">pub fn <a href="#method.lookahead" class="fn">lookahead</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Get the lookahead setting.</p>
145 <p>Refer to <a href="struct.KeychainTxOutIndex.html#method.new" title="associated function bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::new"><code>new</code></a> for more information on the <code>lookahead</code>.</p>
146 </div></details><details class="toggle method-toggle" open><summary><section id="method.lookahead_to_target" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#412-422">Source</a><h4 class="code-header">pub fn <a href="#method.lookahead_to_target" class="fn">lookahead_to_target</a>(&amp;mut self, keychain: K, target_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Store lookahead scripts until <code>target_index</code> (inclusive).</p>
147 <p>This does not change the global <code>lookahead</code> setting.</p>
148 </div></details><details class="toggle method-toggle" open><summary><section id="method.unbounded_spk_iter" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#458-464">Source</a><h4 class="code-header">pub fn <a href="#method.unbounded_spk_iter" class="fn">unbounded_spk_iter</a>(
149 &amp;self,
150 keychain: K,
151 ) -&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="struct" href="../../struct.SpkIterator.html" title="struct bdk_chain::SpkIterator">SpkIterator</a>&lt;Descriptor&lt;DescriptorPublicKey&gt;&gt;&gt;</h4></section></summary><div class="docblock"><p>Get an unbounded spk iterator over a given <code>keychain</code>. Returns <code>None</code> if the provided
152 keychain doesn’t exist</p>
153 </div></details><details class="toggle method-toggle" open><summary><section id="method.all_unbounded_spk_iters" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#467-479">Source</a><h4 class="code-header">pub fn <a href="#method.all_unbounded_spk_iters" class="fn">all_unbounded_spk_iters</a>(
154 &amp;self,
155 ) -&gt; <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;K, <a class="struct" href="../../struct.SpkIterator.html" title="struct bdk_chain::SpkIterator">SpkIterator</a>&lt;Descriptor&lt;DescriptorPublicKey&gt;&gt;&gt;</h4></section></summary><div class="docblock"><p>Get unbounded spk iterators for all keychains.</p>
156 </div></details><details class="toggle method-toggle" open><summary><section id="method.revealed_spks" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#482-515">Source</a><h4 class="code-header">pub fn <a href="#method.revealed_spks" class="fn">revealed_spks</a>(
157 &amp;self,
158 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;K&gt;,
159 ) -&gt; impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a>&lt;K, <a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</a>&gt;&gt; + '_</h4></section></summary><div class="docblock"><p>Iterate over revealed spks of keychains in <code>range</code></p>
160 </div></details><details class="toggle method-toggle" open><summary><section id="method.revealed_keychain_spks" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#521-533">Source</a><h4 class="code-header">pub fn <a href="#method.revealed_keychain_spks" class="fn">revealed_keychain_spks</a>(
161 &amp;self,
162 keychain: K,
163 ) -&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="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a>&lt;<a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</a>&gt;&gt; + '_</h4></section></summary><div class="docblock"><p>Iterate over revealed spks of the given <code>keychain</code> with ascending indices.</p>
164 <p>This is a double ended iterator so you can easily reverse it to get an iterator where
165 the script pubkeys that were most recently revealed are first.</p>
166 </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/keychain_txout.rs.html#536-543">Source</a><h4 class="code-header">pub fn <a href="#method.unused_spks" class="fn">unused_spks</a>(
167 &amp;self,
168 ) -&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="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a>&lt;K, <a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</a>&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + '_</h4></section></summary><div class="docblock"><p>Iterate over revealed, but unused, spks of all keychains.</p>
169 </div></details><details class="toggle method-toggle" open><summary><section id="method.unused_keychain_spks" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#547-559">Source</a><h4 class="code-header">pub fn <a href="#method.unused_keychain_spks" class="fn">unused_keychain_spks</a>(
170 &amp;self,
171 keychain: K,
172 ) -&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="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a>&lt;<a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</a>&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + '_</h4></section></summary><div class="docblock"><p>Iterate over revealed, but unused, spks of the given <code>keychain</code>.
173 Returns an empty iterator if the provided keychain doesn’t exist.</p>
174 </div></details><details class="toggle method-toggle" open><summary><section id="method.next_index" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#573-594">Source</a><h4 class="code-header">pub fn <a href="#method.next_index" class="fn">next_index</a>(&amp;self, keychain: K) -&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.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)&gt;</h4></section></summary><div class="docblock"><p>Get the next derivation index for <code>keychain</code>. The next index is the index after the last revealed
175 derivation index.</p>
176 <p>The second field in the returned tuple represents whether the next derivation index is new.
177 There are two scenarios where the next derivation index is reused (not new):</p>
178 <ol>
179 <li>The keychain’s descriptor has no wildcard, and a script has already been revealed.</li>
180 <li>The number of revealed scripts has already reached 2^31 (refer to BIP-32).</li>
181 </ol>
182 <p>Not checking the second field of the tuple may result in address reuse.</p>
183 <p>Returns None if the provided <code>keychain</code> doesn’t exist.</p>
184 </div></details><details class="toggle method-toggle" open><summary><section id="method.last_revealed_indices" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#599-607">Source</a><h4 class="code-header">pub fn <a href="#method.last_revealed_indices" class="fn">last_revealed_indices</a>(&amp;self) -&gt; <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;K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</h4></section></summary><div class="docblock"><p>Get the last derivation index that is revealed for each keychain.</p>
185 <p>Keychains with no revealed indices will not be included in the returned <a href="https://doc.rust-lang.org/nightly/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap"><code>BTreeMap</code></a>.</p>
186 </div></details><details class="toggle method-toggle" open><summary><section id="method.last_revealed_index" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#611-614">Source</a><h4 class="code-header">pub fn <a href="#method.last_revealed_index" class="fn">last_revealed_index</a>(&amp;self, keychain: K) -&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.u32.html">u32</a>&gt;</h4></section></summary><div class="docblock"><p>Get the last derivation index revealed for <code>keychain</code>. Returns None if the keychain doesn’t
187 exist, or if the keychain doesn’t have any revealed scripts.</p>
188 </div></details><details class="toggle method-toggle" open><summary><section id="method.reveal_to_target_multi" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#617-627">Source</a><h4 class="code-header">pub fn <a href="#method.reveal_to_target_multi" class="fn">reveal_to_target_multi</a>(
189 &amp;mut self,
190 keychains: &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;K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
191 ) -&gt; <a class="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</a></h4></section></summary><div class="docblock"><p>Convenience method to call <a href="struct.KeychainTxOutIndex.html#method.reveal_to_target" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::reveal_to_target"><code>Self::reveal_to_target</code></a> on multiple keychains.</p>
192 </div></details><details class="toggle method-toggle" open><summary><section id="method.reveal_to_target" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#642-663">Source</a><h4 class="code-header">pub fn <a href="#method.reveal_to_target" class="fn">reveal_to_target</a>(
193 &amp;mut self,
194 keychain: K,
195 target_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
196 ) -&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="struct" href="../../bitcoin/base58/struct.Vec.html" title="struct bdk_chain::bitcoin::base58::Vec">Vec</a>&lt;<a class="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a>&lt;<a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</a>&gt;&gt;, <a class="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</a>)&gt;</h4></section></summary><div class="docblock"><p>Reveals script pubkeys of the <code>keychain</code>’s descriptor <strong>up to and including</strong> the
197 <code>target_index</code>.</p>
198 <p>If the <code>target_index</code> cannot be reached (due to the descriptor having no wildcard and/or
199 the <code>target_index</code> is in the hardened index range), this method will make a best-effort and
200 reveal up to the last possible index.</p>
201 <p>This returns list of newly revealed indices (alongside their scripts) and a
202 <a href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet"><code>ChangeSet</code></a>, which reports updates to the latest revealed index. If no new script
203 pubkeys are revealed, then both of these will be empty.</p>
204 <p>Returns None if the provided <code>keychain</code> doesn’t exist.</p>
205 </div></details><details class="toggle method-toggle" open><summary><section id="method.reveal_next_spk" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#677-692">Source</a><h4 class="code-header">pub fn <a href="#method.reveal_next_spk" class="fn">reveal_next_spk</a>(
206 &amp;mut self,
207 keychain: K,
208 ) -&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="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a>&lt;<a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</a>&gt;, <a class="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</a>)&gt;</h4></section></summary><div class="docblock"><p>Attempts to reveal the next script pubkey for <code>keychain</code>.</p>
209 <p>Returns the derivation index of the revealed script pubkey, the revealed script pubkey and a
210 <a href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet"><code>ChangeSet</code></a> which represents changes in the last revealed index (if any).
211 Returns None if the provided keychain doesn’t exist.</p>
212 <p>When a new script cannot be revealed, we return the last revealed script and an empty
213 <a href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet"><code>ChangeSet</code></a>. There are two scenarios when a new script pubkey cannot be derived:</p>
214 <ol>
215 <li>The descriptor has no wildcard and already has one script revealed.</li>
216 <li>The descriptor has already revealed scripts up to the numeric bound.</li>
217 <li>There is no descriptor associated with the given keychain.</li>
218 </ol>
219 </div></details><details class="toggle method-toggle" open><summary><section id="method.next_unused_spk" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#707-714">Source</a><h4 class="code-header">pub fn <a href="#method.next_unused_spk" class="fn">next_unused_spk</a>(
220 &amp;mut self,
221 keychain: K,
222 ) -&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="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a>&lt;<a class="struct" href="../../bitcoin/struct.ScriptBuf.html" title="struct bdk_chain::bitcoin::ScriptBuf">ScriptBuf</a>&gt;, <a class="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</a>)&gt;</h4></section></summary><div class="docblock"><p>Gets the next unused script pubkey in the keychain. I.e., the script pubkey with the lowest
223 index that has not been used yet.</p>
224 <p>This will derive and reveal a new script pubkey if no more unused script pubkeys exist.</p>
225 <p>If the descriptor has no wildcard and already has a used script pubkey or if a descriptor
226 has used all scripts up to the derivation bounds, then the last derived script pubkey will be
227 returned.</p>
228 <p>Returns <code>None</code> if there are no script pubkeys that have been used and no new script pubkey
229 could be revealed (see <a href="struct.KeychainTxOutIndex.html#method.reveal_next_spk" title="method bdk_chain::indexer::keychain_txout::KeychainTxOutIndex::reveal_next_spk"><code>reveal_next_spk</code></a> for when this happens).</p>
230 </div></details><details class="toggle method-toggle" open><summary><section id="method.keychain_outpoints" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#718-724">Source</a><h4 class="code-header">pub fn <a href="#method.keychain_outpoints" class="fn">keychain_outpoints</a>(
231 &amp;self,
232 keychain: K,
233 ) -&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="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a>&lt;<a class="struct" href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint">OutPoint</a>&gt;&gt; + '_</h4></section></summary><div class="docblock"><p>Iterate over all <a href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint"><code>OutPoint</code></a>s that have <code>TxOut</code>s with script pubkeys derived from
234 <code>keychain</code>.</p>
235 </div></details><details class="toggle method-toggle" open><summary><section id="method.keychain_outpoints_in_range" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#727-734">Source</a><h4 class="code-header">pub fn <a href="#method.keychain_outpoints_in_range" class="fn">keychain_outpoints_in_range</a>&lt;'a&gt;(
236 &amp;'a self,
237 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;K&gt; + 'a,
238 ) -&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="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a>&lt;K, <a class="struct" href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint">OutPoint</a>&gt;&gt; + 'a</h4></section></summary><div class="docblock"><p>Iterate over <a href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint"><code>OutPoint</code></a>s that have script pubkeys derived from keychains in <code>range</code>.</p>
239 </div></details><details class="toggle method-toggle" open><summary><section id="method.last_used_index" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#753-755">Source</a><h4 class="code-header">pub fn <a href="#method.last_used_index" class="fn">last_used_index</a>(&amp;self, keychain: K) -&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.u32.html">u32</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the highest derivation index of the <code>keychain</code> where <a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex"><code>KeychainTxOutIndex</code></a> has
240 found a <a href="../../bitcoin/struct.TxOut.html" title="struct bdk_chain::bitcoin::TxOut"><code>TxOut</code></a> with it’s script pubkey.</p>
241 </div></details><details class="toggle method-toggle" open><summary><section id="method.last_used_indices" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#759-767">Source</a><h4 class="code-header">pub fn <a href="#method.last_used_indices" class="fn">last_used_indices</a>(&amp;self) -&gt; <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;K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the highest derivation index of each keychain that <a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex"><code>KeychainTxOutIndex</code></a> has found
242 a <a href="../../bitcoin/struct.TxOut.html" title="struct bdk_chain::bitcoin::TxOut"><code>TxOut</code></a> with it’s script pubkey.</p>
243 </div></details><details class="toggle method-toggle" open><summary><section id="method.apply_changeset" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#770-776">Source</a><h4 class="code-header">pub fn <a href="#method.apply_changeset" class="fn">apply_changeset</a>(&amp;mut self, changeset: <a class="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</a>)</h4></section></summary><div class="docblock"><p>Applies the <code>ChangeSet&lt;K&gt;</code> to the <a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex"><code>KeychainTxOutIndex&lt;K&gt;</code></a></p>
244 </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-KeychainTxOutIndex%3CK%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#123">Source</a><a href="#impl-Clone-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K: <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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&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/keychain_txout.rs.html#123">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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&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#174">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: &amp;Self)</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-KeychainTxOutIndex%3CK%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#123">Source</a><a href="#impl-Debug-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K: <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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&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/keychain_txout.rs.html#123">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-KeychainTxOutIndex%3CK%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#133-137">Source</a><a href="#impl-Default-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&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/keychain_txout.rs.html#134-136">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-KeychainTxOutIndex%3CK%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#139-180">Source</a><a href="#impl-Indexer-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K: <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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.ChangeSet" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#140">Source</a><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="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</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/keychain_txout.rs.html#142-156">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: <a class="struct" href="../../bitcoin/struct.OutPoint.html" title="struct bdk_chain::bitcoin::OutPoint">OutPoint</a>, txout: &amp;<a class="struct" href="../../bitcoin/struct.TxOut.html" title="struct bdk_chain::bitcoin::TxOut">TxOut</a>) -&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/keychain_txout.rs.html#158-165">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;<a class="struct" href="../../bitcoin/struct.Transaction.html" title="struct bdk_chain::bitcoin::Transaction">Transaction</a>) -&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/keychain_txout.rs.html#167-171">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-1" class="method trait-impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#173-175">Source</a><a href="#method.apply_changeset-1" 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/keychain_txout.rs.html#177-179">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;<a class="struct" href="../../bitcoin/struct.Transaction.html" title="struct bdk_chain::bitcoin::Transaction">Transaction</a>) -&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-KeychainTxOutIndex%3CK%3E" class="impl"><a href="#impl-Freeze-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;</h3></section><section id="impl-RefUnwindSafe-for-KeychainTxOutIndex%3CK%3E" class="impl"><a href="#impl-RefUnwindSafe-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;<div class="where">where
245 K: <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-KeychainTxOutIndex%3CK%3E" class="impl"><a href="#impl-Send-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;<div class="where">where
246 K: <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-KeychainTxOutIndex%3CK%3E" class="impl"><a href="#impl-Sync-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;<div class="where">where
247 K: <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-KeychainTxOutIndex%3CK%3E" class="impl"><a href="#impl-Unpin-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;<div class="where">where
248 K: <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-KeychainTxOutIndex%3CK%3E" class="impl"><a href="#impl-UnwindSafe-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl&lt;K&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.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a>&lt;K&gt;<div class="where">where
249 K: <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#138">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
250 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#139">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#209">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
251 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#211">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#217">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
252 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#218">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-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#273">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
253 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 method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#275">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&amp;self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dst</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">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#767">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#770">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>
254 </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#750-752">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
255 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#760">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>
256 <p>That is, this conversion is whatever the implementation of
257 <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>
258 </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#82-84">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
259 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 class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#86">Source</a><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#87">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#91">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#807-809">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
260 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 class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#811">Source</a><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#814">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#792-794">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
261 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 class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#796">Source</a><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#799">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
262 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>