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-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="bdk_chain" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (78a775127 2024-05-11)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../bdk_chain/index.html">bdk_chain</a><span class="version">0.16.0</span></h2></div><h2 class="location"><a href="#">KeychainTxOutIndex</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.all_unbounded_spk_iters">all_unbounded_spk_iters</a></li><li><a href="#method.apply_changeset">apply_changeset</a></li><li><a href="#method.get_descriptor">get_descriptor</a></li><li><a href="#method.index_of_spk">index_of_spk</a></li><li><a href="#method.inner">inner</a></li><li><a href="#method.insert_descriptor">insert_descriptor</a></li><li><a href="#method.is_used">is_used</a></li><li><a href="#method.keychain_outpoints">keychain_outpoints</a></li><li><a href="#method.keychain_outpoints_in_range">keychain_outpoints_in_range</a></li><li><a href="#method.keychains">keychains</a></li><li><a href="#method.last_revealed_index">last_revealed_index</a></li><li><a href="#method.last_revealed_indices">last_revealed_indices</a></li><li><a href="#method.last_used_index">last_used_index</a></li><li><a href="#method.last_used_indices">last_used_indices</a></li><li><a href="#method.lookahead">lookahead</a></li><li><a href="#method.lookahead_to_target">lookahead_to_target</a></li><li><a href="#method.mark_used">mark_used</a></li><li><a href="#method.net_value">net_value</a></li><li><a href="#method.new">new</a></li><li><a href="#method.next_index">next_index</a></li><li><a href="#method.next_unused_spk">next_unused_spk</a></li><li><a href="#method.outpoints">outpoints</a></li><li><a href="#method.reveal_next_spk">reveal_next_spk</a></li><li><a href="#method.reveal_to_target">reveal_to_target</a></li><li><a href="#method.reveal_to_target_multi">reveal_to_target_multi</a></li><li><a href="#method.revealed_keychain_spks">revealed_keychain_spks</a></li><li><a href="#method.revealed_spks">revealed_spks</a></li><li><a href="#method.sent_and_received">sent_and_received</a></li><li><a href="#method.spk_at_index">spk_at_index</a></li><li><a href="#method.txout">txout</a></li><li><a href="#method.txouts">txouts</a></li><li><a href="#method.txouts_in_tx">txouts_in_tx</a></li><li><a href="#method.unbounded_spk_iter">unbounded_spk_iter</a></li><li><a href="#method.unmark_used">unmark_used</a></li><li><a href="#method.unused_keychain_spks">unused_keychain_spks</a></li><li><a href="#method.unused_spks">unused_spks</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-KeychainTxOutIndex%3CK%3E">Clone</a></li><li><a href="#impl-Debug-for-KeychainTxOutIndex%3CK%3E">Debug</a></li><li><a href="#impl-Default-for-KeychainTxOutIndex%3CK%3E">Default</a></li><li><a href="#impl-Indexer-for-KeychainTxOutIndex%3CK%3E">Indexer</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-KeychainTxOutIndex%3CK%3E">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-KeychainTxOutIndex%3CK%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-KeychainTxOutIndex%3CK%3E">Send</a></li><li><a href="#impl-Sync-for-KeychainTxOutIndex%3CK%3E">Sync</a></li><li><a href="#impl-Unpin-for-KeychainTxOutIndex%3CK%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-KeychainTxOutIndex%3CK%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-T">VZip<V></a></li></ul></section><h2><a href="index.html">In bdk_chain::indexer::keychain_txout</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../../index.html">bdk_chain</a>::<wbr><a href="../index.html">indexer</a>::<wbr><a href="index.html">keychain_txout</a>::<wbr><a class="struct" href="#">KeychainTxOutIndex</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#123-130">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct KeychainTxOutIndex<K> { <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 [<code>TxOut</code>]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
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;
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 {
52 <span class="kw">let </span><span class="kw-2">mut </span>txout_index = KeychainTxOutIndex::<MyKeychain>::default();
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>;
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#181-202">source</a><a href="#impl-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl<K> <a class="struct" href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a><K></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#192-201">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>) -> 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#205-332">source</a><a href="#impl-KeychainTxOutIndex%3CK%3E-1" class="anchor">§</a><h3 class="code-header">impl<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>> <a class="struct" href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a><K></h3></section></summary><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><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.inner" class="method"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#210-212">source</a><h4 class="code-header">pub fn <a href="#method.inner" class="fn">inner</a>(&self) -> &<a class="struct" href="../spk_txout/struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex">SpkTxOutIndex</a><(K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)></h4></section></summary><div class="docblock"><p>Return a reference to the internal <a href="../spk_txout/struct.SpkTxOutIndex.html" title="struct bdk_chain::indexer::spk_txout::SpkTxOutIndex"><code>SpkTxOutIndex</code></a>.</p>
69 <p><strong>WARNING</strong>: The internal index will contain lookahead spks. Refer to
70 <a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">struct-level docs</a> for more about <code>lookahead</code>.</p>
71 </div></details><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#215-217">source</a><h4 class="code-header">pub fn <a href="#method.outpoints" class="fn">outpoints</a>(&self) -> &<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><<a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a><K, OutPoint>></h4></section></summary><div class="docblock"><p>Get the set of indexed outpoints, corresponding to tracked keychains.</p>
72 </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#220-227">source</a><h4 class="code-header">pub fn <a href="#method.txouts" class="fn">txouts</a>(
74 ) -> 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><Item = <a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a><K, (OutPoint, &TxOut)>> + <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>
75 </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#230-237">source</a><h4 class="code-header">pub fn <a href="#method.txouts_in_tx" class="fn">txouts_in_tx</a>(
78 ) -> 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><Item = <a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a><K, (OutPoint, &TxOut)>></h4></section></summary><div class="docblock"><p>Finds all txouts on a transaction that has previously been scanned and indexed.</p>
79 </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#245-249">source</a><h4 class="code-header">pub fn <a href="#method.txout" class="fn">txout</a>(&self, outpoint: OutPoint) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a><K, &TxOut>></h4></section></summary><div class="docblock"><p>Return the [<code>TxOut</code>] of <code>outpoint</code> if it has been indexed, and if it corresponds to a
81 <p>The associated keychain and keychain index of the txout’s spk is also returned.</p>
82 <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>
83 </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#254-256">source</a><h4 class="code-header">pub fn <a href="#method.spk_at_index" class="fn">spk_at_index</a>(&self, keychain: K, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ScriptBuf></h4></section></summary><div class="docblock"><p>Return the script that exists under the given <code>keychain</code>’s <code>index</code>.</p>
84 <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>
85 </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#261-263">source</a><h4 class="code-header">pub fn <a href="#method.index_of_spk" class="fn">index_of_spk</a>(&self, script: ScriptBuf) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)></h4></section></summary><div class="docblock"><p>Returns the keychain and keychain index associated with the spk.</p>
86 <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>
87 </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#271-273">source</a><h4 class="code-header">pub fn <a href="#method.is_used" class="fn">is_used</a>(&self, keychain: K, index: <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></h4></section></summary><div class="docblock"><p>Returns whether the spk under the <code>keychain</code>’s <code>index</code> has been used.</p>
88 <p>Here, “unused” means that after the script pubkey was stored in the index, the index has
89 never scanned a transaction output with it.</p>
90 <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>
91 </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#291-293">source</a><h4 class="code-header">pub fn <a href="#method.mark_used" class="fn">mark_used</a>(&mut self, keychain: K, index: <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></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
93 <p>This only has an effect when the <code>index</code> had been added to <code>self</code> already and was unused.</p>
94 <p>Returns whether the spk under the given <code>keychain</code> and <code>index</code> is successfully
95 marked as used. Returns false either when there is no descriptor under the given
96 keychain, or when the spk is already marked as used.</p>
97 <p>This is useful when you want to reserve a script pubkey for something but don’t want to add
98 the transaction output using it to the index yet. Other callers will consider <code>index</code> on
99 <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>
100 <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>
101 </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#304-306">source</a><h4 class="code-header">pub fn <a href="#method.unmark_used" class="fn">unmark_used</a>(&mut self, keychain: K, index: <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></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
102 <code>unused</code>.</p>
103 <p>Note that if <code>self</code> has scanned an output with this script pubkey, then this will have no
105 <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>
106 </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#313-320">source</a><h4 class="code-header">pub fn <a href="#method.sent_and_received" class="fn">sent_and_received</a>(
108 tx: &Transaction,
109 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><K>
110 ) -> (Amount, Amount)</h4></section></summary><div class="docblock"><p>Computes the total value transfer effect <code>tx</code> has on the script pubkeys belonging to the
111 keychains in <code>range</code>. Value is <em>sent</em> when a script pubkey in the <code>range</code> is on an input and
112 <em>received</em> when it is on an output. For <code>sent</code> to be computed correctly, the output being
113 spent must have already been scanned by the index. Calculating received just uses the
114 [<code>Transaction</code>] outputs directly, so it will be correct even if it has not been scanned.</p>
115 </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#329-331">source</a><h4 class="code-header">pub fn <a href="#method.net_value" class="fn">net_value</a>(
117 tx: &Transaction,
118 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><K>
119 ) -> SignedAmount</h4></section></summary><div class="docblock"><p>Computes the net value that this transaction gives to the script pubkeys in the index and
120 <em>takes</em> from the transaction outputs in the index. Shorthand for calling
121 <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>
122 <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>
123 </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#334-784">source</a><a href="#impl-KeychainTxOutIndex%3CK%3E-2" class="anchor">§</a><h3 class="code-header">impl<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>> <a class="struct" href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a><K></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#336-343">source</a><h4 class="code-header">pub fn <a href="#method.keychains" class="fn">keychains</a>(
125 ) -> 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><Item = (K, &Descriptor<DescriptorPublicKey>)> + <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>
126 </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#360-398">source</a><h4 class="code-header">pub fn <a href="#method.insert_descriptor" class="fn">insert_descriptor</a>(
129 descriptor: Descriptor<DescriptorPublicKey>
130 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<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><K>></h4></section></summary><div class="docblock"><p>Insert a descriptor with a keychain associated to it.</p>
131 <p>Adding a descriptor means you will be able to derive new script pubkeys under it and the
132 txout index will discover transaction outputs with those script pubkeys (once they’ve been
133 derived and added to the index).</p>
134 <p>keychain <-> descriptor is a one-to-one mapping that cannot be changed. Attempting to do so
135 will return a <a href="enum.InsertDescriptorError.html" title="enum bdk_chain::indexer::keychain_txout::InsertDescriptorError"><code>InsertDescriptorError<K></code></a>.</p>
136 <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
137 script pubkey at index 0, but it’s up to you to ensure that descriptors don’t collide at
138 other indices. If they do nothing catastrophic happens at the <code>KeychainTxOutIndex</code> level
139 (one keychain just becomes the defacto owner of that spk arbitrarily) but this may have
140 subtle implications up the application stack like one UTXO being missing from one keychain
141 because it has been assigned to another which produces the same script pubkey.</p>
142 </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#402-405">source</a><h4 class="code-header">pub fn <a href="#method.get_descriptor" class="fn">get_descriptor</a>(
145 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&Descriptor<DescriptorPublicKey>></h4></section></summary><div class="docblock"><p>Gets the descriptor associated with the keychain. Returns <code>None</code> if the keychain doesn’t
146 have a descriptor associated with it.</p>
147 </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#412-414">source</a><h4 class="code-header">pub fn <a href="#method.lookahead" class="fn">lookahead</a>(&self) -> <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>
148 <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>
149 </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#419-429">source</a><h4 class="code-header">pub fn <a href="#method.lookahead_to_target" class="fn">lookahead_to_target</a>(&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>
150 <p>This does not change the global <code>lookahead</code> setting.</p>
151 </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#465-471">source</a><h4 class="code-header">pub fn <a href="#method.unbounded_spk_iter" class="fn">unbounded_spk_iter</a>(
154 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../struct.SpkIterator.html" title="struct bdk_chain::SpkIterator">SpkIterator</a><Descriptor<DescriptorPublicKey>>></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
155 keychain doesn’t exist</p>
156 </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#474-486">source</a><h4 class="code-header">pub fn <a href="#method.all_unbounded_spk_iters" class="fn">all_unbounded_spk_iters</a>(
158 ) -> <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><K, <a class="struct" href="../../struct.SpkIterator.html" title="struct bdk_chain::SpkIterator">SpkIterator</a><Descriptor<DescriptorPublicKey>>></h4></section></summary><div class="docblock"><p>Get unbounded spk iterators for all keychains.</p>
159 </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#489-522">source</a><h4 class="code-header">pub fn <a href="#method.revealed_spks" class="fn">revealed_spks</a>(
161 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><K>
162 ) -> 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><Item = <a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a><K, ScriptBuf>> + '_</h4></section></summary><div class="docblock"><p>Iterate over revealed spks of keychains in <code>range</code></p>
163 </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#528-540">source</a><h4 class="code-header">pub fn <a href="#method.revealed_keychain_spks" class="fn">revealed_keychain_spks</a>(
166 ) -> 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><Item = <a class="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a><ScriptBuf>> + '_</h4></section></summary><div class="docblock"><p>Iterate over revealed spks of the given <code>keychain</code> with ascending indices.</p>
167 <p>This is a double ended iterator so you can easily reverse it to get an iterator where
168 the script pubkeys that were most recently revealed are first.</p>
169 </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#543-550">source</a><h4 class="code-header">pub fn <a href="#method.unused_spks" class="fn">unused_spks</a>(
171 ) -> 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><Item = <a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a><K, ScriptBuf>> + <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>
172 </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#554-566">source</a><h4 class="code-header">pub fn <a href="#method.unused_keychain_spks" class="fn">unused_keychain_spks</a>(
175 ) -> 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><Item = <a class="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a><ScriptBuf>> + <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>.
176 Returns an empty iterator if the provided keychain doesn’t exist.</p>
177 </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#580-601">source</a><h4 class="code-header">pub fn <a href="#method.next_index" class="fn">next_index</a>(&self, keychain: K) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<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>)></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
178 derivation index.</p>
179 <p>The second field in the returned tuple represents whether the next derivation index is new.
180 There are two scenarios where the next derivation index is reused (not new):</p>
182 <li>The keychain’s descriptor has no wildcard, and a script has already been revealed.</li>
183 <li>The number of revealed scripts has already reached 2^31 (refer to BIP-32).</li>
185 <p>Not checking the second field of the tuple may result in address reuse.</p>
186 <p>Returns None if the provided <code>keychain</code> doesn’t exist.</p>
187 </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#606-614">source</a><h4 class="code-header">pub fn <a href="#method.last_revealed_indices" class="fn">last_revealed_indices</a>(&self) -> <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><K, <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 last derivation index that is revealed for each keychain.</p>
188 <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>
189 </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#618-621">source</a><h4 class="code-header">pub fn <a href="#method.last_revealed_index" class="fn">last_revealed_index</a>(&self, keychain: K) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<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 last derivation index revealed for <code>keychain</code>. Returns None if the keychain doesn’t
190 exist, or if the keychain doesn’t have any revealed scripts.</p>
191 </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#624-634">source</a><h4 class="code-header">pub fn <a href="#method.reveal_to_target_multi" class="fn">reveal_to_target_multi</a>(
193 keychains: &<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><K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>
194 ) -> <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>
195 </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#649-670">source</a><h4 class="code-header">pub fn <a href="#method.reveal_to_target" class="fn">reveal_to_target</a>(
198 target_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>
199 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a><ScriptBuf>>, <a class="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</a>)></h4></section></summary><div class="docblock"><p>Reveals script pubkeys of the <code>keychain</code>’s descriptor <strong>up to and including</strong> the
200 <code>target_index</code>.</p>
201 <p>If the <code>target_index</code> cannot be reached (due to the descriptor having no wildcard and/or
202 the <code>target_index</code> is in the hardened index range), this method will make a best-effort and
203 reveal up to the last possible index.</p>
204 <p>This returns list of newly revealed indices (alongside their scripts) and a
205 <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
206 pubkeys are revealed, then both of these will be empty.</p>
207 <p>Returns None if the provided <code>keychain</code> doesn’t exist.</p>
208 </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#684-699">source</a><h4 class="code-header">pub fn <a href="#method.reveal_next_spk" class="fn">reveal_next_spk</a>(
211 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a><ScriptBuf>, <a class="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</a>)></h4></section></summary><div class="docblock"><p>Attempts to reveal the next script pubkey for <code>keychain</code>.</p>
212 <p>Returns the derivation index of the revealed script pubkey, the revealed script pubkey and a
213 <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).
214 Returns None if the provided keychain doesn’t exist.</p>
215 <p>When a new script cannot be revealed, we return the last revealed script and an empty
216 <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>
218 <li>The descriptor has no wildcard and already has one script revealed.</li>
219 <li>The descriptor has already revealed scripts up to the numeric bound.</li>
220 <li>There is no descriptor associated with the given keychain.</li>
222 </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#714-721">source</a><h4 class="code-header">pub fn <a href="#method.next_unused_spk" class="fn">next_unused_spk</a>(
225 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a><ScriptBuf>, <a class="struct" href="struct.ChangeSet.html" title="struct bdk_chain::indexer::keychain_txout::ChangeSet">ChangeSet</a>)></h4></section></summary><div class="docblock"><p>Gets the next unused script pubkey in the keychain. I.e., the script pubkey with the lowest
226 index that has not been used yet.</p>
227 <p>This will derive and reveal a new script pubkey if no more unused script pubkeys exist.</p>
228 <p>If the descriptor has no wildcard and already has a used script pubkey or if a descriptor
229 has used all scripts up to the derivation bounds, then the last derived script pubkey will be
231 <p>Returns <code>None</code> if there are no script pubkeys that have been used and no new script pubkey
232 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>
233 </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#725-731">source</a><h4 class="code-header">pub fn <a href="#method.keychain_outpoints" class="fn">keychain_outpoints</a>(
236 ) -> 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><Item = <a class="type" href="../../type.Indexed.html" title="type bdk_chain::Indexed">Indexed</a><OutPoint>> + '_</h4></section></summary><div class="docblock"><p>Iterate over all [<code>OutPoint</code>]s that have <code>TxOut</code>s with script pubkeys derived from
237 <code>keychain</code>.</p>
238 </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#734-741">source</a><h4 class="code-header">pub fn <a href="#method.keychain_outpoints_in_range" class="fn">keychain_outpoints_in_range</a><'a>(
240 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><K> + 'a
241 ) -> 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><Item = <a class="type" href="../../type.KeychainIndexed.html" title="type bdk_chain::KeychainIndexed">KeychainIndexed</a><K, OutPoint>> + 'a</h4></section></summary><div class="docblock"><p>Iterate over [<code>OutPoint</code>]s that have script pubkeys derived from keychains in <code>range</code>.</p>
242 </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#760-762">source</a><h4 class="code-header">pub fn <a href="#method.last_used_index" class="fn">last_used_index</a>(&self, keychain: K) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></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
243 found a [<code>TxOut</code>] with it’s script pubkey.</p>
244 </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#766-774">source</a><h4 class="code-header">pub fn <a href="#method.last_used_indices" class="fn">last_used_indices</a>(&self) -> <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><K, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></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
245 a [<code>TxOut</code>] with it’s script pubkey.</p>
246 </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#777-783">source</a><h4 class="code-header">pub fn <a href="#method.apply_changeset" class="fn">apply_changeset</a>(&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<K></code> to the <a href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex"><code>KeychainTxOutIndex<K></code></a></p>
247 </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#122">source</a><a href="#impl-Clone-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl<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/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><K></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#122">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>(&self) -> <a class="struct" href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a><K></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-KeychainTxOutIndex%3CK%3E" class="impl"><a class="src rightside" href="../../../src/bdk_chain/indexer/keychain_txout.rs.html#122">source</a><a href="#impl-Debug-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl<K: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <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><K></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#122">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>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <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#132-136">source</a><a href="#impl-Default-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl<K> <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><K></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#133-135">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>() -> 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#138-179">source</a><a href="#impl-Indexer-for-KeychainTxOutIndex%3CK%3E" class="anchor">§</a><h3 class="code-header">impl<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>> <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><K></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.ChangeSet" class="associatedtype trait-impl"><a href="#associatedtype.ChangeSet" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Indexer.html#associatedtype.ChangeSet" class="associatedtype">ChangeSet</a> = <a class="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#141-155">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>(&mut self, outpoint: OutPoint, txout: &TxOut) -> 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#157-164">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>(&mut self, tx: &Transaction) -> 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#166-170">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>(&self) -> 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#172-174">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>(&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#176-178">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>(&self, tx: &Transaction) -> <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<K> <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><K></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<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> for <a class="struct" href="struct.KeychainTxOutIndex.html" title="struct bdk_chain::indexer::keychain_txout::KeychainTxOutIndex">KeychainTxOutIndex</a><K><div class="where">where
248 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<K> <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><K><div class="where">where
249 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<K> <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><K><div class="where">where
250 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<K> <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><K><div class="where">where
251 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<K> <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><K><div class="where">where
252 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#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
253 T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
254 T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
255 T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
256 </div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
257 U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#758">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
258 <p>That is, this conversion is whatever the implementation of
259 <code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
260 </div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <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
261 T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
262 U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="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'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
263 U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#797">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="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'>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<V, T> VZip<V> for T<div class="where">where
264 V: MultiLane<T>,</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) -> V</h4></section></div></details></div></section></div></main></body></html>