]> Untitled Git - bitcoindevkit.org/blob
0a71f51027741fe9fbc72113889c8a3484c1cf5c
[bitcoindevkit.org] /
1 <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An valid length HRP string that has been parsed, had the checksum validated, had the witness version validated, had the witness data length checked, and the had witness version and checksum removed."><title>SegwitHrpstring in bdk_chain::bitcoin::bech32::primitives::decode - 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-5d1d17d0.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.86.0-nightly (f3d1d47fd 2025-01-20)" data-channel="nightly" data-search-js="search-ccb196c1.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="#">Segwit<wbr>Hrpstring</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.byte_iter" title="byte_iter">byte_iter</a></li><li><a href="#method.data_part_ascii_no_witver_no_checksum" title="data_part_ascii_no_witver_no_checksum">data_part_ascii_no_witver_no_checksum</a></li><li><a href="#method.has_valid_hrp" title="has_valid_hrp">has_valid_hrp</a></li><li><a href="#method.hrp" title="hrp">hrp</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.new_bech32" title="new_bech32">new_bech32</a></li><li><a href="#method.witness_version" title="witness_version">witness_version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-SegwitHrpstring%3C's%3E" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-SegwitHrpstring%3C's%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-SegwitHrpstring%3C's%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-SegwitHrpstring%3C's%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-SegwitHrpstring%3C's%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-SegwitHrpstring%3C's%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-SegwitHrpstring%3C's%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-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-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>bitcoin::<wbr>bech32::<wbr>primitives::<wbr>decode</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">bitcoin</a>::<wbr><a href="../../index.html">bech32</a>::<wbr><a href="../index.html">primitives</a>::<wbr><a href="index.html">decode</a></span><h1>Struct <span class="struct">SegwitHrpstring</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub struct SegwitHrpstring&lt;'s&gt; { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An valid length HRP string that has been parsed, had the checksum validated, had the witness
2 version validated, had the witness data length checked, and the had witness version and checksum
3 removed.</p>
4 <h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
5 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::primitives::decode::SegwitHrpstring;
6
7 <span class="comment">// Parse a segwit V0 address.
8 </span><span class="kw">let </span>address = <span class="string">"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
9 <span class="kw">let </span>segwit = SegwitHrpstring::new(address).expect(<span class="string">"valid segwit address"</span>);
10
11 <span class="comment">// Do something with the encoded data.
12 </span><span class="kw">let _ </span>= segwit.byte_iter();</code></pre></div>
13 </div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-SegwitHrpstring%3C's%3E" class="impl"><a href="#impl-SegwitHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&gt; <a class="struct" href="struct.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(s: &amp;'s <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&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="struct" href="struct.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;, <a class="enum" href="enum.SegwitHrpstringError.html" title="enum bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstringError">SegwitHrpstringError</a>&gt;</h4></section></summary><div class="docblock"><p>Parses an HRP string, treating the first data character as a witness version.</p>
14 <p>The version byte does not appear in the extracted binary data, but is covered by the
15 checksum. It can be accessed with <a href="struct.SegwitHrpstring.html#method.witness_version" title="method bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring::witness_version"><code>Self::witness_version</code></a>.</p>
16 <p>NOTE: We do not enforce any restrictions on the HRP, use <a href="struct.SegwitHrpstring.html#method.has_valid_hrp" title="method bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring::has_valid_hrp"><code>SegwitHrpstring::has_valid_hrp</code></a>
17 to get strict BIP conformance (also <a href="../../struct.Hrp.html#method.is_valid_on_mainnet" title="method bdk_chain::bitcoin::bech32::Hrp::is_valid_on_mainnet"><code>Hrp::is_valid_on_mainnet</code></a> and friends).</p>
18 </div></details><details class="toggle method-toggle" open><summary><section id="method.new_bech32" class="method"><h4 class="code-header">pub fn <a href="#method.new_bech32" class="fn">new_bech32</a>(
19 s: &amp;'s <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
20 ) -&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="struct" href="struct.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;, <a class="enum" href="enum.SegwitHrpstringError.html" title="enum bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstringError">SegwitHrpstringError</a>&gt;</h4></section></summary><div class="docblock"><p>Parses an HRP string, treating the first data character as a witness version.</p>
21 <h6 id="warning"><a class="doc-anchor" href="#warning">§</a>WARNING</h6>
22 <p>You almost certainly do not want to use this function.</p>
23 <p>It is provided for backwards comparability to parse addresses that have an non-zero witness
24 version because <a href="https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki">BIP-173</a> explicitly allows using the bech32 checksum with any witness
25 version however <a href="https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki">BIP-350</a> specifies all witness version &gt; 0 now MUST use bech32m.</p>
26 </div></details><details class="toggle method-toggle" open><summary><section id="method.has_valid_hrp" class="method"><h4 class="code-header">pub fn <a href="#method.has_valid_hrp" class="fn">has_valid_hrp</a>(&amp;self) -&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 <code>true</code> if the HRP is “bc” or “tb”.</p>
27 <p>BIP-173 requires that the HRP is “bc” or “tb” but software in the Bitcoin ecosystem uses
28 other HRPs, specifically “bcrt” for regtest addresses. We provide this function in order to
29 be BIP-173 compliant but their are no restrictions on the HRP of <a href="struct.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring"><code>SegwitHrpstring</code></a>.</p>
30 </div></details><details class="toggle method-toggle" open><summary><section id="method.hrp" class="method"><h4 class="code-header">pub fn <a href="#method.hrp" class="fn">hrp</a>(&amp;self) -&gt; <a class="struct" href="../../struct.Hrp.html" title="struct bdk_chain::bitcoin::bech32::Hrp">Hrp</a></h4></section></summary><div class="docblock"><p>Returns the human-readable part.</p>
31 </div></details><details class="toggle method-toggle" open><summary><section id="method.witness_version" class="method"><h4 class="code-header">pub fn <a href="#method.witness_version" class="fn">witness_version</a>(&amp;self) -&gt; <a class="struct" href="../../struct.Fe32.html" title="struct bdk_chain::bitcoin::bech32::Fe32">Fe32</a></h4></section></summary><div class="docblock"><p>Returns the witness version.</p>
32 </div></details><details class="toggle method-toggle" open><summary><section id="method.data_part_ascii_no_witver_no_checksum" class="method"><h4 class="code-header">pub fn <a href="#method.data_part_ascii_no_witver_no_checksum" class="fn">data_part_ascii_no_witver_no_checksum</a>(&amp;self) -&gt; &amp;'s [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&amp;&#39;s [u8]">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a partial slice of the data part, as ASCII bytes, everything after the witness
33 version and before the checksum.</p>
34 <p>The byte values are guaranteed to be valid bech32 characters.</p>
35 <h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
36 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::{Bech32, primitives::decode::SegwitHrpstring};
37
38 <span class="kw">let </span>addr = <span class="string">"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
39 <span class="kw">let </span>ascii = <span class="string">"ar0srrr7xfkvy5l643lydnw9re59gtzz"</span>;
40
41 <span class="kw">let </span>segwit = SegwitHrpstring::new(<span class="kw-2">&amp;</span>addr).unwrap();
42 <span class="macro">assert!</span>(segwit.data_part_ascii_no_witver_no_checksum().iter().eq(ascii.as_bytes().iter()))</code></pre></div>
43 </div></details><details class="toggle method-toggle" open><summary><section id="method.byte_iter" class="method"><h4 class="code-header">pub fn <a href="#method.byte_iter" class="fn">byte_iter</a>(&amp;self) -&gt; <a class="struct" href="struct.ByteIter.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::ByteIter">ByteIter</a>&lt;'_&gt; <a href="#" class="tooltip" data-notable-ty="ByteIter&lt;&#39;_&gt;">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns an iterator that yields the data part, excluding the witness version, of the parsed
44 bech32 encoded string.</p>
45 <p>Converts the ASCII bytes representing field elements to the respective field elements, then
46 converts the stream of field elements to a stream of bytes.</p>
47 <p>Use <code>self.witness_version()</code> to get the witness version.</p>
48 </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-Debug-for-SegwitHrpstring%3C's%3E" class="impl"><a href="#impl-Debug-for-SegwitHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&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.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><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="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.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</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></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-SegwitHrpstring%3C's%3E" class="impl"><a href="#impl-Freeze-for-SegwitHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&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.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-RefUnwindSafe-for-SegwitHrpstring%3C's%3E" class="impl"><a href="#impl-RefUnwindSafe-for-SegwitHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&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.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Send-for-SegwitHrpstring%3C's%3E" class="impl"><a href="#impl-Send-for-SegwitHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&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.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Sync-for-SegwitHrpstring%3C's%3E" class="impl"><a href="#impl-Sync-for-SegwitHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&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.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Unpin-for-SegwitHrpstring%3C's%3E" class="impl"><a href="#impl-Unpin-for-SegwitHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&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.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-UnwindSafe-for-SegwitHrpstring%3C's%3E" class="impl"><a href="#impl-UnwindSafe-for-SegwitHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&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.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring">SegwitHrpstring</a>&lt;'s&gt;</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
49 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
50 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
51 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-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>
52 </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
53 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>
54 <p>That is, this conversion is whatever the implementation of
55 <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>
56 </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
57 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
58 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
59 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><script type="text/json" id="notable-traits-data">{"&'s [u8]":"<h3>Notable traits for <code>&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>]</div>","ByteIter<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.ByteIter.html\" title=\"struct bdk_chain::bitcoin::bech32::primitives::decode::ByteIter\">ByteIter</a>&lt;'s&gt;</code></h3><pre><code><div class=\"where\">impl&lt;'s&gt; <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> for <a class=\"struct\" href=\"struct.ByteIter.html\" title=\"struct bdk_chain::bitcoin::bech32::primitives::decode::ByteIter\">ByteIter</a>&lt;'s&gt;</div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"primitive\" href=\"https://doc.rust-lang.org/nightly/std/primitive.u8.html\">u8</a>;</div>"}</script></section></div></main></body></html>