]> Untitled Git - bitcoindevkit.org/blob
c599f5eab465b08871cd358f80d87bc41dd81758
[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="The core of a random number generator."><title>RngCore in bdk_chain::bitcoin::secp256k1::rand::prelude - 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 trait"><!--[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="#">RngCore</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.fill_bytes" title="fill_bytes">fill_bytes</a></li><li><a href="#tymethod.next_u32" title="next_u32">next_u32</a></li><li><a href="#tymethod.next_u64" title="next_u64">next_u64</a></li><li><a href="#tymethod.try_fill_bytes" title="try_fill_bytes">try_fill_bytes</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-RngCore-for-%26mut+R" title="&#38;&#39;a mut R">&#38;&#39;a mut R</a></li><li><a href="#impl-RngCore-for-Box%3CR%3E" title="Box&#60;R&#62;">Box&#60;R&#62;</a></li><li><a href="#impl-RngCore-for-ChaCha12Rng" title="ChaCha12Rng">ChaCha12Rng</a></li><li><a href="#impl-RngCore-for-ChaCha20Rng" title="ChaCha20Rng">ChaCha20Rng</a></li><li><a href="#impl-RngCore-for-ChaCha8Rng" title="ChaCha8Rng">ChaCha8Rng</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Read-for-dyn+RngCore" title="Read">Read</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In bdk_<wbr>chain::<wbr>bitcoin::<wbr>secp256k1::<wbr>rand::<wbr>prelude</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">secp256k1</a>::<wbr><a href="../index.html">rand</a>::<wbr><a href="index.html">prelude</a></span><h1>Trait <span class="trait">RngCore</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#142">Source</a> </span></div><pre class="rust item-decl"><code>pub trait RngCore {
2 // Required methods
3 fn <a href="#tymethod.next_u32" class="fn">next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>;
4 <span class="item-spacer"></span> fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>;
5 <span class="item-spacer"></span> fn <a href="#tymethod.fill_bytes" class="fn">fill_bytes</a>(&amp;mut self, dest: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]);
6 <span class="item-spacer"></span> fn <a href="#tymethod.try_fill_bytes" class="fn">try_fill_bytes</a>(&amp;mut self, dest: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>&gt;;
7 }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The core of a random number generator.</p>
8 <p>This trait encapsulates the low-level functionality common to all
9 generators, and is the “back end”, to be implemented by generators.
10 End users should normally use the <code>Rng</code> trait from the <a href="https://docs.rs/rand"><code>rand</code></a> crate,
11 which is automatically implemented for every type implementing <code>RngCore</code>.</p>
12 <p>Three different methods for generating random data are provided since the
13 optimal implementation of each is dependent on the type of generator. There
14 is no required relationship between the output of each; e.g. many
15 implementations of <a href="../trait.RngCore.html#tymethod.fill_bytes" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::fill_bytes"><code>fill_bytes</code></a> consume a whole number of <code>u32</code> or <code>u64</code>
16 values and drop any remaining unused bytes. The same can happen with the
17 <a href="../trait.RngCore.html#tymethod.next_u32" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::next_u32"><code>next_u32</code></a> and <a href="../trait.RngCore.html#tymethod.next_u64" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::next_u64"><code>next_u64</code></a> methods, implementations may discard some
18 random bits for efficiency.</p>
19 <p>The <a href="../trait.RngCore.html#tymethod.try_fill_bytes" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::try_fill_bytes"><code>try_fill_bytes</code></a> method is a variant of <a href="../trait.RngCore.html#tymethod.fill_bytes" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::fill_bytes"><code>fill_bytes</code></a> allowing error
20 handling; it is not deemed sufficiently useful to add equivalents for
21 <a href="../trait.RngCore.html#tymethod.next_u32" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::next_u32"><code>next_u32</code></a> or <a href="../trait.RngCore.html#tymethod.next_u64" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::next_u64"><code>next_u64</code></a> since the latter methods are almost always used
22 with algorithmic generators (PRNGs), which are normally infallible.</p>
23 <p>Implementers should produce bits uniformly. Pathological RNGs (e.g. always
24 returning the same value, or never setting certain bits) can break rejection
25 sampling used by random distributions, and also break other RNGs when
26 seeding them via <a href="../trait.SeedableRng.html#method.from_rng" title="associated function bdk_chain::bitcoin::secp256k1::rand::SeedableRng::from_rng"><code>SeedableRng::from_rng</code></a>.</p>
27 <p>Algorithmic generators implementing <a href="../trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng"><code>SeedableRng</code></a> should normally have
28 <em>portable, reproducible</em> output, i.e. fix Endianness when converting values
29 to avoid platform differences, and avoid making any changes which affect
30 output (except by communicating that the release has breaking changes).</p>
31 <p>Typically an RNG will implement only one of the methods available
32 in this trait directly, then use the helper functions from the
33 <a href="https://rust-random.github.io/rand/rand_core/impls/index.html" title="mod rand_core::impls"><code>impls</code></a> module to implement the other methods.</p>
34 <p>It is recommended that implementations also implement:</p>
35 <ul>
36 <li><code>Debug</code> with a custom implementation which <em>does not</em> print any internal
37 state (at least, <a href="../trait.CryptoRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::CryptoRng"><code>CryptoRng</code></a>s should not risk leaking state through
38 <code>Debug</code>).</li>
39 <li><code>Serialize</code> and <code>Deserialize</code> (from Serde), preferably making Serde
40 support optional at the crate level in PRNG libs.</li>
41 <li><code>Clone</code>, if possible.</li>
42 <li><em>never</em> implement <code>Copy</code> (accidental copies may cause repeated values).</li>
43 <li><em>do not</em> implement <code>Default</code> for pseudorandom generators, but instead
44 implement <a href="../trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng"><code>SeedableRng</code></a>, to guide users towards proper seeding.
45 External / hardware RNGs can choose to implement <code>Default</code>.</li>
46 <li><code>Eq</code> and <code>PartialEq</code> could be implemented, but are probably not useful.</li>
47 </ul>
48 <h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
49 <p>A simple example, obviously not generating very <em>random</em> output:</p>
50
51 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![allow(dead_code)]
52 </span><span class="kw">use </span>rand_core::{RngCore, Error, impls};
53
54 <span class="kw">struct </span>CountingRng(u64);
55
56 <span class="kw">impl </span>RngCore <span class="kw">for </span>CountingRng {
57 <span class="kw">fn </span>next_u32(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u32 {
58 <span class="self">self</span>.next_u64() <span class="kw">as </span>u32
59 }
60
61 <span class="kw">fn </span>next_u64(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; u64 {
62 <span class="self">self</span>.<span class="number">0 </span>+= <span class="number">1</span>;
63 <span class="self">self</span>.<span class="number">0
64 </span>}
65
66 <span class="kw">fn </span>fill_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, dest: <span class="kw-2">&amp;mut </span>[u8]) {
67 impls::fill_bytes_via_next(<span class="self">self</span>, dest)
68 }
69
70 <span class="kw">fn </span>try_fill_bytes(<span class="kw-2">&amp;mut </span><span class="self">self</span>, dest: <span class="kw-2">&amp;mut </span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;(), Error&gt; {
71 <span class="prelude-val">Ok</span>(<span class="self">self</span>.fill_bytes(dest))
72 }
73 }</code></pre></div>
74 </div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.next_u32" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#148">Source</a><h4 class="code-header">fn <a href="#tymethod.next_u32" class="fn">next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Return the next random <code>u32</code>.</p>
75 <p>RNGs must implement at least one method from this trait directly. In
76 the case this method is not implemented directly, it can be implemented
77 using <code>self.next_u64() as u32</code> or via <a href="https://rust-random.github.io/rand/rand_core/impls/fn.next_u32_via_fill.html" title="fn rand_core::impls::next_u32_via_fill"><code>impls::next_u32_via_fill</code></a>.</p>
78 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.next_u64" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#155">Source</a><h4 class="code-header">fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>Return the next random <code>u64</code>.</p>
79 <p>RNGs must implement at least one method from this trait directly. In
80 the case this method is not implemented directly, it can be implemented
81 via <a href="https://rust-random.github.io/rand/rand_core/impls/fn.next_u64_via_u32.html" title="fn rand_core::impls::next_u64_via_u32"><code>impls::next_u64_via_u32</code></a> or via <a href="https://rust-random.github.io/rand/rand_core/impls/fn.next_u64_via_fill.html" title="fn rand_core::impls::next_u64_via_fill"><code>impls::next_u64_via_fill</code></a>.</p>
82 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.fill_bytes" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#171">Source</a><h4 class="code-header">fn <a href="#tymethod.fill_bytes" class="fn">fill_bytes</a>(&amp;mut self, dest: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Fill <code>dest</code> with random data.</p>
83 <p>RNGs must implement at least one method from this trait directly. In
84 the case this method is not implemented directly, it can be implemented
85 via <a href="https://rust-random.github.io/rand/rand_core/impls/fn.fill_bytes_via_next.html" title="fn rand_core::impls::fill_bytes_via_next"><code>impls::fill_bytes_via_next</code></a> or
86 via <a href="../trait.RngCore.html#tymethod.try_fill_bytes" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::try_fill_bytes"><code>RngCore::try_fill_bytes</code></a>; if this generator can
87 fail the implementation must choose how best to handle errors here
88 (e.g. panic with a descriptive message or log a warning and retry a few
89 times).</p>
90 <p>This method should guarantee that <code>dest</code> is entirely filled
91 with new data, and may panic if this is impossible
92 (e.g. reading past the end of a file that is being used as the
93 source of randomness).</p>
94 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_fill_bytes" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#184">Source</a><h4 class="code-header">fn <a href="#tymethod.try_fill_bytes" class="fn">try_fill_bytes</a>(&amp;mut self, dest: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>&gt;</h4></section></summary><div class="docblock"><p>Fill <code>dest</code> entirely with random data.</p>
95 <p>This is the only method which allows an RNG to report errors while
96 generating random data thus making this the primary method implemented
97 by external (true) RNGs (e.g. <code>OsRng</code>) which can fail. It may be used
98 directly to generate keys and to seed (infallible) PRNGs.</p>
99 <p>Other than error handling, this method is identical to <a href="../trait.RngCore.html#tymethod.fill_bytes" title="method bdk_chain::bitcoin::secp256k1::rand::RngCore::fill_bytes"><code>RngCore::fill_bytes</code></a>;
100 thus this may be implemented using <code>Ok(self.fill_bytes(dest))</code> or
101 <code>fill_bytes</code> may be implemented with
102 <code>self.try_fill_bytes(dest).unwrap()</code> or more specific error handling.</p>
103 </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-Read-for-dyn+RngCore" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#473">Source</a><a href="#impl-Read-for-dyn+RngCore" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for dyn <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#474">Source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read" class="fn">read</a>(&amp;mut self, buf: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Pull some bytes from this source into the specified buffer, returning
104 how many bytes were read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.read_vectored" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.36.0">1.36.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#782">Source</a></span><a href="#method.read_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_vectored" class="fn">read_vectored</a>(&amp;mut self, bufs: &amp;mut [<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSliceMut.html" title="struct std::io::IoSliceMut">IoSliceMut</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.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Like <code>read</code>, except that it reads into a slice of buffers. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_vectored">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_read_vectored" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#795">Source</a><a href="#method.is_read_vectored" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.is_read_vectored" class="fn">is_read_vectored</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>can_vector</code>)</span></div></span><div class='docblock'>Determines if this <code>Read</code>er has an efficient <code>read_vectored</code>
105 implementation. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.is_read_vectored">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.read_to_end" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#879">Source</a></span><a href="#method.read_to_end" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end" class="fn">read_to_end</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="../../../base58/struct.Vec.html" title="struct bdk_chain::bitcoin::base58::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&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.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Reads all bytes until EOF in this source, placing them into <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.read_to_string" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#922">Source</a></span><a href="#method.read_to_string" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string" class="fn">read_to_string</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="../../../base58/struct.String.html" title="struct bdk_chain::bitcoin::base58::String">String</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Reads all bytes until EOF in this source, appending them to <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.read_exact" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#975">Source</a></span><a href="#method.read_exact" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact" class="fn">read_exact</a>(&amp;mut self, buf: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Reads the exact number of bytes required to fill <code>buf</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.read_buf" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#988">Source</a><a href="#method.read_buf" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf" class="fn">read_buf</a>(&amp;mut self, buf: <a class="struct" href="https://doc.rust-lang.org/nightly/core/io/borrowed_buf/struct.BorrowedCursor.html" title="struct core::io::borrowed_buf::BorrowedCursor">BorrowedCursor</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/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>read_buf</code>)</span></div></span><div class='docblock'>Pull some bytes from this source into the specified buffer. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.read_buf_exact" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#1011">Source</a><a href="#method.read_buf_exact" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf_exact" class="fn">read_buf_exact</a>(&amp;mut self, cursor: <a class="struct" href="https://doc.rust-lang.org/nightly/core/io/borrowed_buf/struct.BorrowedCursor.html" title="struct core::io::borrowed_buf::BorrowedCursor">BorrowedCursor</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/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>read_buf</code>)</span></div></span><div class='docblock'>Reads the exact number of bytes required to fill <code>cursor</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_buf_exact">Read more</a></div></details></div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-RngCore-for-ChaCha8Rng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#impl-RngCore-for-ChaCha8Rng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha8Rng.html" title="struct rand_chacha::chacha::ChaCha8Rng">ChaCha8Rng</a></h3></section></summary><div class="impl-items"><section id="method.next_u32" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#method.next_u32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u32" class="fn">next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.next_u64" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#method.next_u64" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.fill_bytes" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#method.fill_bytes" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.fill_bytes" class="fn">fill_bytes</a>(&amp;mut self, bytes: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.try_fill_bytes" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#method.try_fill_bytes" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.try_fill_bytes" class="fn">try_fill_bytes</a>(&amp;mut self, bytes: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-RngCore-for-ChaCha12Rng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#impl-RngCore-for-ChaCha12Rng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha12Rng.html" title="struct rand_chacha::chacha::ChaCha12Rng">ChaCha12Rng</a></h3></section></summary><div class="impl-items"><section id="method.next_u32-1" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#method.next_u32-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u32" class="fn">next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.next_u64-1" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#method.next_u64-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.fill_bytes-1" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#method.fill_bytes-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.fill_bytes" class="fn">fill_bytes</a>(&amp;mut self, bytes: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.try_fill_bytes-1" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#method.try_fill_bytes-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.try_fill_bytes" class="fn">try_fill_bytes</a>(&amp;mut self, bytes: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-RngCore-for-ChaCha20Rng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#impl-RngCore-for-ChaCha20Rng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha20Rng.html" title="struct rand_chacha::chacha::ChaCha20Rng">ChaCha20Rng</a></h3></section></summary><div class="impl-items"><section id="method.next_u32-2" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#method.next_u32-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u32" class="fn">next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.next_u64-2" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#method.next_u64-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.fill_bytes-2" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#method.fill_bytes-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.fill_bytes" class="fn">fill_bytes</a>(&amp;mut self, bytes: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.try_fill_bytes-2" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#method.try_fill_bytes-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.try_fill_bytes" class="fn">try_fill_bytes</a>(&amp;mut self, bytes: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-RngCore-for-%26mut+R" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#424">Source</a><a href="#impl-RngCore-for-%26mut+R" class="anchor">§</a><h3 class="code-header">impl&lt;'a, R&gt; <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut R</a><div class="where">where
106 R: <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> + ?<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"><section id="method.next_u32-3" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#426">Source</a><a href="#method.next_u32-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u32" class="fn">next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.next_u64-3" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#431">Source</a><a href="#method.next_u64-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.fill_bytes-3" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#436">Source</a><a href="#method.fill_bytes-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.fill_bytes" class="fn">fill_bytes</a>(&amp;mut self, dest: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.try_fill_bytes-3" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#441">Source</a><a href="#method.try_fill_bytes-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.try_fill_bytes" class="fn">try_fill_bytes</a>(&amp;mut self, dest: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>&gt;</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-RngCore-for-Box%3CR%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#450">Source</a><a href="#impl-RngCore-for-Box%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;R&gt;<div class="where">where
107 R: <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> + ?<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"><section id="method.next_u32-4" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#452">Source</a><a href="#method.next_u32-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u32" class="fn">next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section><section id="method.next_u64-4" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#457">Source</a><a href="#method.next_u64-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.next_u64" class="fn">next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h4></section><section id="method.fill_bytes-4" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#462">Source</a><a href="#method.fill_bytes-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.fill_bytes" class="fn">fill_bytes</a>(&amp;mut self, dest: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section><section id="method.try_fill_bytes-4" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#467">Source</a><a href="#method.try_fill_bytes-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.try_fill_bytes" class="fn">try_fill_bytes</a>(&amp;mut self, dest: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-RngCore-for-StepRng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/rngs/mock.rs.html#48">Source</a><a href="#impl-RngCore-for-StepRng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="../rngs/mock/struct.StepRng.html" title="struct bdk_chain::bitcoin::secp256k1::rand::rngs::mock::StepRng">StepRng</a></h3></section><section id="impl-RngCore-for-OsRng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/os.rs.html#52">Source</a><a href="#impl-RngCore-for-OsRng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="../rngs/struct.OsRng.html" title="struct bdk_chain::bitcoin::secp256k1::rand::rngs::OsRng">OsRng</a></h3></section><section id="impl-RngCore-for-StdRng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/rngs/std.rs.html#36">Source</a><a href="#impl-RngCore-for-StdRng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="struct.StdRng.html" title="struct bdk_chain::bitcoin::secp256k1::rand::prelude::StdRng">StdRng</a></h3></section><section id="impl-RngCore-for-ThreadRng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/rngs/thread.rs.html#99">Source</a><a href="#impl-RngCore-for-ThreadRng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="struct.ThreadRng.html" title="struct bdk_chain::bitcoin::secp256k1::rand::prelude::ThreadRng">ThreadRng</a></h3></section><section id="impl-RngCore-for-ReadRng%3CR%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/rngs/adapter/read.rs.html#50">Source</a><a href="#impl-RngCore-for-ReadRng%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="../rngs/adapter/struct.ReadRng.html" title="struct bdk_chain::bitcoin::secp256k1::rand::rngs::adapter::ReadRng">ReadRng</a>&lt;R&gt;<div class="where">where
108 R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,</div></h3></section><section id="impl-RngCore-for-BlockRng64%3CR%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/block.rs.html#349-351">Source</a><a href="#impl-RngCore-for-BlockRng64%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_core/block/struct.BlockRng64.html" title="struct rand_core::block::BlockRng64">BlockRng64</a>&lt;R&gt;<div class="where">where
109 R: <a class="trait" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>&gt;,
110 &lt;R as <a class="trait" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&gt;::<a class="associatedtype" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html#associatedtype.Results" title="type rand_core::block::BlockRngCore::Results">Results</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>]&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>]&gt;,</div></h3></section><section id="impl-RngCore-for-BlockRng%3CR%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/block.rs.html#181-183">Source</a><a href="#impl-RngCore-for-BlockRng%3CR%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R&gt; <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_core/block/struct.BlockRng.html" title="struct rand_core::block::BlockRng">BlockRng</a>&lt;R&gt;<div class="where">where
111 R: <a class="trait" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,
112 &lt;R as <a class="trait" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&gt;::<a class="associatedtype" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html#associatedtype.Results" title="type rand_core::block::BlockRngCore::Results">Results</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>]&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>]&gt;,</div></h3></section><section id="impl-RngCore-for-ReseedingRng%3CR,+Rsdr%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/rngs/adapter/reseeding.rs.html#113-116">Source</a><a href="#impl-RngCore-for-ReseedingRng%3CR,+Rsdr%3E" class="anchor">§</a><h3 class="code-header">impl&lt;R, Rsdr&gt; <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a> for <a class="struct" href="../rngs/adapter/struct.ReseedingRng.html" title="struct bdk_chain::bitcoin::secp256k1::rand::rngs::adapter::ReseedingRng">ReseedingRng</a>&lt;R, Rsdr&gt;<div class="where">where
113 Rsdr: <a class="trait" href="../trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a>,
114 R: <a class="trait" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt; + <a class="trait" href="../trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>,
115 &lt;R as <a class="trait" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&gt;::<a class="associatedtype" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html#associatedtype.Results" title="type rand_core::block::BlockRngCore::Results">Results</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>]&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>]&gt;,</div></h3></section></div><script src="../../../../../trait.impl/rand_core/trait.RngCore.js" data-ignore-extern-crates="rand,rand_core,alloc,rand_chacha" async></script></section></div></main></body></html>