]> Untitled Git - bitcoindevkit.org/blob
e8b92560a864626bf628ad6703ef33307226c843
[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 HRP string that has been parsed and had the checksum validated."><title>CheckedHrpstring 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="#">Checked<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_checksum" title="data_part_ascii_no_checksum">data_part_ascii_no_checksum</a></li><li><a href="#method.fe32_iter" title="fe32_iter">fe32_iter</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.remove_witness_version" title="remove_witness_version">remove_witness_version</a></li><li><a href="#method.validate_segwit" title="validate_segwit">validate_segwit</a></li><li><a href="#method.validate_segwit_padding" title="validate_segwit_padding">validate_segwit_padding</a></li><li><a href="#method.validate_witness_program_length" title="validate_witness_program_length">validate_witness_program_length</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-CheckedHrpstring%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-CheckedHrpstring%3C's%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-CheckedHrpstring%3C's%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CheckedHrpstring%3C's%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-CheckedHrpstring%3C's%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-CheckedHrpstring%3C's%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CheckedHrpstring%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">CheckedHrpstring</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 CheckedHrpstring&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 HRP string that has been parsed and had the checksum validated.</p>
2 <p>This type does not treat the first byte of the data part in any special way i.e., as the witness
3 version byte. If you are parsing Bitcoin segwit addresses consider using <a href="struct.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring"><code>SegwitHrpstring</code></a>.</p>
4 <blockquote>
5 <p>We first describe the general checksummed base32 format called Bech32 and then
6 define Segregated Witness addresses using it.</p>
7 </blockquote>
8 <p>This type abstracts over the general checksummed base32 format called Bech32.</p>
9 <h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
10 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::{Bech32m, primitives::decode::CheckedHrpstring};
11
12 <span class="comment">// Parse a general checksummed bech32 encoded string.
13 </span><span class="kw">let </span>s = <span class="string">"abcd14g08d6qejxtdg4y5r3zarvary0c5xw7knqc5r8"</span>;
14 <span class="kw">let </span>checked = CheckedHrpstring::new::&lt;Bech32m&gt;(s)
15 .expect(<span class="string">"valid bech32 string with a valid checksum according to the bech32m algorithm"</span>);
16
17 <span class="comment">// Do something with the encoded data.
18 </span><span class="kw">let _ </span>= checked.byte_iter();</code></pre></div>
19 </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-CheckedHrpstring%3C's%3E" class="impl"><a href="#impl-CheckedHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&gt; <a class="struct" href="struct.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</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>&lt;Ck&gt;(
20 s: &amp;'s <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
21 ) -&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.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</a>&lt;'s&gt;, <a class="enum" href="enum.CheckedHrpstringError.html" title="enum bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstringError">CheckedHrpstringError</a>&gt;<div class="where">where
22 Ck: <a class="trait" href="../../trait.Checksum.html" title="trait bdk_chain::bitcoin::bech32::Checksum">Checksum</a>,</div></h4></section></summary><div class="docblock"><p>Parses and validates an HRP string, without treating the first data character specially.</p>
23 <p>If you are validating the checksum multiple times consider using <a href="struct.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring"><code>UncheckedHrpstring</code></a>.</p>
24 <p>This is equivalent to <code>UncheckedHrpstring::new().validate_and_remove_checksum::&lt;CK&gt;()</code>.</p>
25 </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>
26 </div></details><details class="toggle method-toggle" open><summary><section id="method.data_part_ascii_no_checksum" class="method"><h4 class="code-header">pub fn <a href="#method.data_part_ascii_no_checksum" class="fn">data_part_ascii_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 separator ‘1’
27 before the checksum.</p>
28 <p>The byte values are guaranteed to be valid bech32 characters.</p>
29 <h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
30 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::{Bech32, primitives::decode::CheckedHrpstring};
31
32 <span class="kw">let </span>addr = <span class="string">"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
33 <span class="kw">let </span>ascii = <span class="string">"qar0srrr7xfkvy5l643lydnw9re59gtzz"</span>;
34
35 <span class="kw">let </span>checked = CheckedHrpstring::new::&lt;Bech32&gt;(<span class="kw-2">&amp;</span>addr).unwrap();
36 <span class="macro">assert!</span>(checked.data_part_ascii_no_checksum().iter().eq(ascii.as_bytes().iter()))</code></pre></div>
37 </div></details><details class="toggle method-toggle" open><summary><section id="method.remove_witness_version" class="method"><h4 class="code-header">pub fn <a href="#method.remove_witness_version" class="fn">remove_witness_version</a>(&amp;mut self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../struct.Fe32.html" title="struct bdk_chain::bitcoin::bech32::Fe32">Fe32</a>&gt;</h4></section></summary><div class="docblock"><p>Attempts to remove the first byte of the data part, treating it as a witness version.</p>
38 <p>If <a href="struct.CheckedHrpstring.html#method.witness_version" title="method bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring::witness_version"><code>Self::witness_version</code></a> succeeds this function removes the first character (witness
39 version byte) from the internal ASCII data part buffer. Future calls to
40 <a href="struct.CheckedHrpstring.html#method.data_part_ascii_no_checksum" title="method bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring::data_part_ascii_no_checksum"><code>Self::data_part_ascii_no_checksum</code></a> will no longer include it.</p>
41 <h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
42 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::{primitives::decode::CheckedHrpstring, Bech32, Fe32};
43
44 <span class="kw">let </span>addr = <span class="string">"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
45 <span class="kw">let </span>ascii = <span class="string">"ar0srrr7xfkvy5l643lydnw9re59gtzz"</span>;
46
47 <span class="kw">let </span><span class="kw-2">mut </span>checked = CheckedHrpstring::new::&lt;Bech32&gt;(<span class="kw-2">&amp;</span>addr).unwrap();
48 <span class="kw">let </span>witness_version = checked.remove_witness_version().unwrap();
49 <span class="macro">assert_eq!</span>(witness_version, Fe32::Q);
50 <span class="macro">assert!</span>(checked.data_part_ascii_no_checksum().iter().eq(ascii.as_bytes().iter()))</code></pre></div>
51 </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="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../struct.Fe32.html" title="struct bdk_chain::bitcoin::bech32::Fe32">Fe32</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the segwit witness version if there is one.</p>
52 <p>Attempts to convert the first character of the data part to a witness version. If this
53 succeeds, and it is a valid version (0..16 inclusive) we return it, otherwise <code>None</code>.</p>
54 <p>Future calls to <a href="struct.CheckedHrpstring.html#method.data_part_ascii_no_checksum" title="method bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring::data_part_ascii_no_checksum"><code>Self::data_part_ascii_no_checksum</code></a> will still include the witness
55 version, use <a href="struct.CheckedHrpstring.html#method.remove_witness_version" title="method bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring::remove_witness_version"><code>Self::remove_witness_version</code></a> to remove it.</p>
56 <p>This function makes no guarantees on the validity of the checksum.</p>
57 <h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
58 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::{primitives::decode::CheckedHrpstring, Bech32, Fe32};
59
60 <span class="kw">let </span>addr = <span class="string">"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
61
62 <span class="kw">let </span>checked = CheckedHrpstring::new::&lt;Bech32&gt;(<span class="kw-2">&amp;</span>addr).unwrap();
63 <span class="macro">assert_eq!</span>(checked.witness_version(), <span class="prelude-val">Some</span>(Fe32::Q));</code></pre></div>
64 </div></details><details class="toggle method-toggle" open><summary><section id="method.fe32_iter" class="method"><h4 class="code-header">pub fn <a href="#method.fe32_iter" class="fn">fe32_iter</a>&lt;I&gt;(&amp;self) -&gt; <a class="struct" href="struct.AsciiToFe32Iter.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::AsciiToFe32Iter">AsciiToFe32Iter</a>&lt;'_&gt; <a href="#" class="tooltip" data-notable-ty="AsciiToFe32Iter&lt;&#39;_&gt;">ⓘ</a><div class="where">where
65 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Returns an iterator that yields the data part of the parsed bech32 encoded string as <a href="../../struct.Fe32.html" title="struct bdk_chain::bitcoin::bech32::Fe32"><code>Fe32</code></a>s.</p>
66 <p>Converts the ASCII bytes representing field elements to the respective field elements.</p>
67 </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 of the parsed bech32 encoded string.</p>
68 <p>Converts the ASCII bytes representing field elements to the respective field elements, then
69 converts the stream of field elements to a stream of bytes.</p>
70 </div></details><details class="toggle method-toggle" open><summary><section id="method.validate_segwit" class="method"><h4 class="code-header">pub fn <a href="#method.validate_segwit" class="fn">validate_segwit</a>(
71 self,
72 ) -&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>Converts this type to a <a href="struct.SegwitHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::SegwitHrpstring"><code>SegwitHrpstring</code></a> after validating the witness and HRP.</p>
73 </div></details><details class="toggle method-toggle" open><summary><section id="method.validate_segwit_padding" class="method"><h4 class="code-header">pub fn <a href="#method.validate_segwit_padding" class="fn">validate_segwit_padding</a>(&amp;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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.PaddingError.html" title="enum bdk_chain::bitcoin::bech32::primitives::decode::PaddingError">PaddingError</a>&gt;</h4></section></summary><div class="docblock"><p>Validates the segwit padding rules.</p>
74 <p>Must be called after the witness version byte is removed from the data part.</p>
75 <p>From BIP-173:</p>
76 <blockquote>
77 <p>Re-arrange those bits into groups of 8 bits. Any incomplete group at the
78 end MUST be 4 bits or less, MUST be all zeroes, and is discarded.</p>
79 </blockquote>
80 </div></details><details class="toggle method-toggle" open><summary><section id="method.validate_witness_program_length" class="method"><h4 class="code-header">pub fn <a href="#method.validate_witness_program_length" class="fn">validate_witness_program_length</a>(
81 &amp;self,
82 witness_version: <a class="struct" href="../../struct.Fe32.html" title="struct bdk_chain::bitcoin::bech32::Fe32">Fe32</a>,
83 ) -&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="enum" href="../segwit/enum.WitnessLengthError.html" title="enum bdk_chain::bitcoin::bech32::primitives::segwit::WitnessLengthError">WitnessLengthError</a>&gt;</h4></section></summary><div class="docblock"><p>Validates the segwit witness length rules.</p>
84 <p>Must be called after the witness version byte is removed from the data part.</p>
85 </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-CheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Debug-for-CheckedHrpstring%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.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</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-CheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Freeze-for-CheckedHrpstring%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.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-RefUnwindSafe-for-CheckedHrpstring%3C's%3E" class="impl"><a href="#impl-RefUnwindSafe-for-CheckedHrpstring%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.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Send-for-CheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Send-for-CheckedHrpstring%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.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Sync-for-CheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Sync-for-CheckedHrpstring%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.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Unpin-for-CheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Unpin-for-CheckedHrpstring%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.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-UnwindSafe-for-CheckedHrpstring%3C's%3E" class="impl"><a href="#impl-UnwindSafe-for-CheckedHrpstring%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.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</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
86 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
87 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
88 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>
89 </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
90 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>
91 <p>That is, this conversion is whatever the implementation of
92 <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>
93 </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
94 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
95 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
96 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>","AsciiToFe32Iter<'_>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.AsciiToFe32Iter.html\" title=\"struct bdk_chain::bitcoin::bech32::primitives::decode::AsciiToFe32Iter\">AsciiToFe32Iter</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.AsciiToFe32Iter.html\" title=\"struct bdk_chain::bitcoin::bech32::primitives::decode::AsciiToFe32Iter\">AsciiToFe32Iter</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=\"struct\" href=\"../../struct.Fe32.html\" title=\"struct bdk_chain::bitcoin::bech32::Fe32\">Fe32</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>