]> Untitled Git - bitcoindevkit.org/blob
f880197e65d97210204803e0ed501a86b5ffe0c1
[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 but not yet had the checksum checked."><title>UncheckedHrpstring 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="#">Unchecked<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.data_part_ascii" title="data_part_ascii">data_part_ascii</a></li><li><a href="#method.has_valid_checksum" title="has_valid_checksum">has_valid_checksum</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_checksum" title="remove_checksum">remove_checksum</a></li><li><a href="#method.remove_witness_version" title="remove_witness_version">remove_witness_version</a></li><li><a href="#method.validate_and_remove_checksum" title="validate_and_remove_checksum">validate_and_remove_checksum</a></li><li><a href="#method.validate_checksum" title="validate_checksum">validate_checksum</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-UncheckedHrpstring%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-UncheckedHrpstring%3C's%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-UncheckedHrpstring%3C's%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-UncheckedHrpstring%3C's%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-UncheckedHrpstring%3C's%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-UncheckedHrpstring%3C's%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-UncheckedHrpstring%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">UncheckedHrpstring</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 UncheckedHrpstring&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 but not yet had the checksum checked.</p>
2 <p>Parsing an HRP string only checks validity of the characters, it does not validate the
3 checksum in any way.</p>
4 <p>Unless you are attempting to validate a string with multiple checksums then you likely do not
5 want to use this type directly, instead use [<code>CheckedHrpstring::new(s)</code>].</p>
6 <h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
7 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::{Bech32, Bech32m, primitives::decode::UncheckedHrpstring};
8
9 <span class="kw">let </span>addr = <span class="string">"BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4"</span>;
10 <span class="kw">let </span>unchecked = UncheckedHrpstring::new(addr).expect(<span class="string">"valid bech32 character encoded string"</span>);
11 <span class="kw">if </span>unchecked.has_valid_checksum::&lt;Bech32&gt;() {
12 <span class="comment">// Remove the checksum and do something with the data.
13 </span><span class="kw">let </span>checked = unchecked.remove_checksum::&lt;Bech32&gt;();
14 <span class="kw">let _ </span>= checked.byte_iter();
15 } <span class="kw">else if </span>unchecked.has_valid_checksum::&lt;Bech32m&gt;() {
16 <span class="comment">// Remove the checksum and do something with the data as above.
17 </span>} <span class="kw">else </span>{
18 <span class="comment">// Checksum is not valid for either the bech32 or bech32 checksum algorithms.
19 </span>}</code></pre></div>
20 </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-UncheckedHrpstring%3C's%3E" class="impl"><a href="#impl-UncheckedHrpstring%3C's%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'s&gt; <a class="struct" href="struct.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</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>(
21 s: &amp;'s <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
22 ) -&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.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</a>&lt;'s&gt;, <a class="enum" href="enum.UncheckedHrpstringError.html" title="enum bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstringError">UncheckedHrpstringError</a>&gt;</h4></section></summary><div class="docblock"><p>Parses an bech32 encode string and constructs a <a href="struct.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring"><code>UncheckedHrpstring</code></a> object.</p>
23 <p>Checks for valid ASCII values, does not validate the checksum.</p>
24 </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>
25 </div></details><details class="toggle method-toggle" open><summary><section id="method.data_part_ascii" class="method"><h4 class="code-header">pub fn <a href="#method.data_part_ascii" class="fn">data_part_ascii</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 the data part as ASCII bytes i.e., everything after the separator ‘1’.</p>
26 <p>The byte values are guaranteed to be valid bech32 characters. Includes the checksum
27 if one was present in the parsed string.</p>
28 <h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
29 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::primitives::decode::UncheckedHrpstring;
30
31 <span class="kw">let </span>addr = <span class="string">"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
32 <span class="kw">let </span>ascii = <span class="string">"qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
33
34 <span class="kw">let </span>unchecked = UncheckedHrpstring::new(<span class="kw-2">&amp;</span>addr).unwrap();
35 <span class="macro">assert!</span>(unchecked.data_part_ascii().iter().eq(ascii.as_bytes().iter()))</code></pre></div>
36 </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>
37 <p>If <a href="struct.UncheckedHrpstring.html#method.witness_version" title="method bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring::witness_version"><code>Self::witness_version</code></a> succeeds this function removes the first character (witness
38 version byte) from the internal ASCII data part buffer. Future calls to
39 <a href="struct.UncheckedHrpstring.html#method.data_part_ascii" title="method bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring::data_part_ascii"><code>Self::data_part_ascii</code></a> will no longer include it.</p>
40 <h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
41 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::{primitives::decode::UncheckedHrpstring, Fe32};
42
43 <span class="kw">let </span>addr = <span class="string">"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
44 <span class="kw">let </span>ascii = <span class="string">"ar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"</span>;
45
46 <span class="kw">let </span><span class="kw-2">mut </span>unchecked = UncheckedHrpstring::new(<span class="kw-2">&amp;</span>addr).unwrap();
47 <span class="kw">let </span>witness_version = unchecked.remove_witness_version().unwrap();
48 <span class="macro">assert_eq!</span>(witness_version, Fe32::Q);
49 <span class="macro">assert!</span>(unchecked.data_part_ascii().iter().eq(ascii.as_bytes().iter()))</code></pre></div>
50 </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>
51 <p>Attempts to convert the first character of the data part to a witness version. If this
52 succeeds, and it is a valid version (0..16 inclusive) we return it, otherwise <code>None</code>.</p>
53 <p>Future calls to <a href="struct.UncheckedHrpstring.html#method.data_part_ascii" title="method bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring::data_part_ascii"><code>Self::data_part_ascii</code></a> will still include the witness version, use
54 <a href="struct.UncheckedHrpstring.html#method.remove_witness_version" title="method bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring::remove_witness_version"><code>Self::remove_witness_version</code></a> to remove it.</p>
55 <p>This function makes no guarantees on the validity of the checksum.</p>
56 <h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
57 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bech32::{primitives::decode::UncheckedHrpstring, Fe32};
58
59 <span class="comment">// Note the invalid checksum!
60 </span><span class="kw">let </span>addr = <span class="string">"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzffffff"</span>;
61
62 <span class="kw">let </span>unchecked = UncheckedHrpstring::new(<span class="kw-2">&amp;</span>addr).unwrap();
63 <span class="macro">assert_eq!</span>(unchecked.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.validate_and_remove_checksum" class="method"><h4 class="code-header">pub fn <a href="#method.validate_and_remove_checksum" class="fn">validate_and_remove_checksum</a>&lt;Ck&gt;(
65 self,
66 ) -&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.ChecksumError.html" title="enum bdk_chain::bitcoin::bech32::primitives::decode::ChecksumError">ChecksumError</a>&gt;<div class="where">where
67 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>Validates that data has a valid checksum for the <code>Ck</code> algorithm and returns a <a href="struct.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring"><code>CheckedHrpstring</code></a>.</p>
68 </div></details><details class="toggle method-toggle" open><summary><section id="method.has_valid_checksum" class="method"><h4 class="code-header">pub fn <a href="#method.has_valid_checksum" class="fn">has_valid_checksum</a>&lt;Ck&gt;(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><div class="where">where
69 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>Validates that data has a valid checksum for the <code>Ck</code> algorithm (this may mean an empty
70 checksum if <code>NoChecksum</code> is used).</p>
71 <p>This is useful if you do not know which checksum algorithm was used and wish to validate
72 against multiple algorithms consecutively. If this function returns <code>true</code> then call
73 <code>remove_checksum</code> to get a <a href="struct.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring"><code>CheckedHrpstring</code></a>.</p>
74 </div></details><details class="toggle method-toggle" open><summary><section id="method.validate_checksum" class="method"><h4 class="code-header">pub fn <a href="#method.validate_checksum" class="fn">validate_checksum</a>&lt;Ck&gt;(&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.ChecksumError.html" title="enum bdk_chain::bitcoin::bech32::primitives::decode::ChecksumError">ChecksumError</a>&gt;<div class="where">where
75 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>Validates that data has a valid checksum for the <code>Ck</code> algorithm (this may mean an empty
76 checksum if <code>NoChecksum</code> is used).</p>
77 </div></details><details class="toggle method-toggle" open><summary><section id="method.remove_checksum" class="method"><h4 class="code-header">pub fn <a href="#method.remove_checksum" class="fn">remove_checksum</a>&lt;Ck&gt;(self) -&gt; <a class="struct" href="struct.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring">CheckedHrpstring</a>&lt;'s&gt;<div class="where">where
78 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>Removes the checksum for the <code>Ck</code> algorithm and returns an <a href="struct.CheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::CheckedHrpstring"><code>CheckedHrpstring</code></a>.</p>
79 <p>Data must be valid (ie, first call <code>has_valid_checksum</code> or <code>validate_checksum()</code>). This
80 function is typically paired with <code>has_valid_checksum</code> when validating against multiple
81 checksum algorithms consecutively.</p>
82 <h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
83 <p>May panic if data is not valid.</p>
84 </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-UncheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Debug-for-UncheckedHrpstring%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.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</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-UncheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Freeze-for-UncheckedHrpstring%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.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-RefUnwindSafe-for-UncheckedHrpstring%3C's%3E" class="impl"><a href="#impl-RefUnwindSafe-for-UncheckedHrpstring%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.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Send-for-UncheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Send-for-UncheckedHrpstring%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.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Sync-for-UncheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Sync-for-UncheckedHrpstring%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.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-Unpin-for-UncheckedHrpstring%3C's%3E" class="impl"><a href="#impl-Unpin-for-UncheckedHrpstring%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.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</a>&lt;'s&gt;</h3></section><section id="impl-UnwindSafe-for-UncheckedHrpstring%3C's%3E" class="impl"><a href="#impl-UnwindSafe-for-UncheckedHrpstring%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.UncheckedHrpstring.html" title="struct bdk_chain::bitcoin::bech32::primitives::decode::UncheckedHrpstring">UncheckedHrpstring</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
85 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
86 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
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_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>
88 </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
89 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>
90 <p>That is, this conversion is whatever the implementation of
91 <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>
92 </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
93 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
94 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
95 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>"}</script></section></div></main></body></html>