owoify/target/doc/rand/trait.RngCore.html

114 lines
69 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="API documentation for the Rust `RngCore` trait in crate `rand`."><meta name="keywords" content="rust, rustlang, rust-lang, RngCore"><title>rand::RngCore - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../rand/index.html'><div class='logo-container'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk.png' alt='logo'></div></a><p class='location'>Trait RngCore</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.fill_bytes">fill_bytes</a><a href="#tymethod.next_u32">next_u32</a><a href="#tymethod.next_u64">next_u64</a><a href="#tymethod.try_fill_bytes">try_fill_bytes</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-RngCore-for-%26%27a%20mut%20R">&amp;&#39;a mut R</a><a href="#impl-RngCore-for-BlockRng%3CR%3E">BlockRng&lt;R&gt;</a><a href="#impl-RngCore-for-BlockRng64%3CR%3E">BlockRng64&lt;R&gt;</a><a href="#impl-RngCore-for-Box%3CR%3E">Box&lt;R&gt;</a><a href="#impl-RngCore-for-ChaCha12Rng">ChaCha12Rng</a><a href="#impl-RngCore-for-ChaCha20Rng">ChaCha20Rng</a><a href="#impl-RngCore-for-ChaCha8Rng">ChaCha8Rng</a></div><a class="sidebar-title" href="#implementors">Implementors</a><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Read">Read</a></div></div><p class='location'><a href='index.html'>rand</a></p><script>window.sidebarCurrent = {name: 'RngCore', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/rand_core/lib.rs.html#138-185' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>rand</a>::<wbr><a class="trait" href=''>RngCore</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait RngCore {
fn <a href='#tymethod.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;;
}</pre></div><div class='docblock'><p>The core of a random number generator.</p>
<p>This trait encapsulates the low-level functionality common to all
generators, and is the &quot;back end&quot;, to be implemented by generators.
End users should normally use the <code>Rng</code> trait from the <a href="https://docs.rs/rand"><code>rand</code></a> crate,
which is automatically implemented for every type implementing <code>RngCore</code>.</p>
<p>Three different methods for generating random data are provided since the
optimal implementation of each is dependent on the type of generator. There
is no required relationship between the output of each; e.g. many
implementations of <a href="RngCore::fill_bytes"><code>fill_bytes</code></a> consume a whole number of <code>u32</code> or <code>u64</code>
values and drop any remaining unused bytes.</p>
<p>The <a href="RngCore::try_fill_bytes"><code>try_fill_bytes</code></a> method is a variant of <a href="RngCore::fill_bytes"><code>fill_bytes</code></a> allowing error
handling; it is not deemed sufficiently useful to add equivalents for
<a href="RngCore::next_u32"><code>next_u32</code></a> or <a href="RngCore::next_u64"><code>next_u64</code></a> since the latter methods are almost always used
with algorithmic generators (PRNGs), which are normally infallible.</p>
<p>Algorithmic generators implementing [<code>SeedableRng</code>] should normally have
<em>portable, reproducible</em> output, i.e. fix Endianness when converting values
to avoid platform differences, and avoid making any changes which affect
output (except by communicating that the release has breaking changes).</p>
<p>Typically implementators will implement only one of the methods available
in this trait directly, then use the helper functions from the
[<code>impls</code>] module to implement the other methods.</p>
<p>It is recommended that implementations also implement:</p>
<ul>
<li><code>Debug</code> with a custom implementation which <em>does not</em> print any internal
state (at least, [<code>CryptoRng</code>]s should not risk leaking state through
<code>Debug</code>).</li>
<li><code>Serialize</code> and <code>Deserialize</code> (from Serde), preferably making Serde
support optional at the crate level in PRNG libs.</li>
<li><code>Clone</code>, if possible.</li>
<li><em>never</em> implement <code>Copy</code> (accidental copies may cause repeated values).</li>
<li><em>do not</em> implement <code>Default</code> for pseudorandom generators, but instead
implement [<code>SeedableRng</code>], to guide users towards proper seeding.
External / hardware RNGs can choose to implement <code>Default</code>.</li>
<li><code>Eq</code> and <code>PartialEq</code> could be implemented, but are probably not useful.</li>
</ul>
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
<p>A simple example, obviously not generating very <em>random</em> output:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="attribute">#![<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">use</span> <span class="ident">rand_core</span>::{<span class="ident">RngCore</span>, <span class="ident">Error</span>, <span class="ident">impls</span>};
<span class="kw">struct</span> <span class="ident">CountingRng</span>(<span class="ident">u64</span>);
<span class="kw">impl</span> <span class="ident">RngCore</span> <span class="kw">for</span> <span class="ident">CountingRng</span> {
<span class="kw">fn</span> <span class="ident">next_u32</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-&gt;</span> <span class="ident">u32</span> {
<span class="self">self</span>.<span class="ident">next_u64</span>() <span class="kw">as</span> <span class="ident">u32</span>
}
<span class="kw">fn</span> <span class="ident">next_u64</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) <span class="op">-&gt;</span> <span class="ident">u64</span> {
<span class="self">self</span>.<span class="number">0</span> <span class="op">+=</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="number">0</span>
}
<span class="kw">fn</span> <span class="ident">fill_bytes</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">dest</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> [<span class="ident">u8</span>]) {
<span class="ident">impls</span>::<span class="ident">fill_bytes_via_next</span>(<span class="self">self</span>, <span class="ident">dest</span>)
}
<span class="kw">fn</span> <span class="ident">try_fill_bytes</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">dest</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> [<span class="ident">u8</span>]) <span class="op">-&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="prelude-val">Ok</span>(<span class="self">self</span>.<span class="ident">fill_bytes</span>(<span class="ident">dest</span>))
}
}</pre></div>
</div>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.next_u32' class='method'><code id='next_u32.v'>fn <a href='#tymethod.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h3><div class='docblock'><p>Return the next random <code>u32</code>.</p>
<p>RNGs must implement at least one method from this trait directly. In
the case this method is not implemented directly, it can be implemented
using <code>self.next_u64() as u32</code> or via
[<code>fill_bytes</code>][impls::next_u32_via_fill].</p>
</div><h3 id='tymethod.next_u64' class='method'><code id='next_u64.v'>fn <a href='#tymethod.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></h3><div class='docblock'><p>Return the next random <code>u64</code>.</p>
<p>RNGs must implement at least one method from this trait directly. In
the case this method is not implemented directly, it can be implemented
via [<code>next_u32</code>][impls::next_u64_via_u32] or via
[<code>fill_bytes</code>][impls::next_u64_via_fill].</p>
</div><h3 id='tymethod.fill_bytes' class='method'><code id='fill_bytes.v'>fn <a href='#tymethod.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code></h3><div class='docblock'><p>Fill <code>dest</code> with random data.</p>
<p>RNGs must implement at least one method from this trait directly. In
the case this method is not implemented directly, it can be implemented
via [<code>next_u*</code>][impls::fill_bytes_via_next] or
via [<code>try_fill_bytes</code>][RngCore::try_fill_bytes]; if this generator can
fail the implementation must choose how best to handle errors here
(e.g. panic with a descriptive message or log a warning and retry a few
times).</p>
<p>This method should guarantee that <code>dest</code> is entirely filled
with new data, and may panic if this is impossible
(e.g. reading past the end of a file that is being used as the
source of randomness).</p>
</div><h3 id='tymethod.try_fill_bytes' class='method'><code id='try_fill_bytes.v'>fn <a href='#tymethod.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code></h3><div class='docblock'><p>Fill <code>dest</code> entirely with random data.</p>
<p>This is the only method which allows an RNG to report errors while
generating random data thus making this the primary method implemented
by external (true) RNGs (e.g. <code>OsRng</code>) which can fail. It may be used
directly to generate keys and to seed (infallible) PRNGs.</p>
<p>Other than error handling, this method is identical to <a href="RngCore::fill_bytes"><code>fill_bytes</code></a>;
thus this may be implemented using <code>Ok(self.fill_bytes(dest))</code> or
<code>fill_bytes</code> may be implemented with
<code>self.try_fill_bytes(dest).unwrap()</code> or more specific error handling.</p>
</div></div><span class='loading-content'>Loading content...</span><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Read' class='impl'><code class='in-band'>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="../rand/trait.RngCore.html" title="trait rand::RngCore">RngCore</a> + 'static</code><a href='#impl-Read' class='anchor'></a><a class='srclink' href='../src/rand_core/lib.rs.html#438-443' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.read' class="method hidden"><code id='read.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read' class='fnname'>read</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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;</code><a class='srclink' href='../src/rand_core/lib.rs.html#439-442' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Pull some bytes from this source into the specified buffer, returning how many bytes were read. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#tymethod.read">Read more</a></p>
</div><h4 id='method.read_vectored' class="method"><code id='read_vectored.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_vectored' class='fnname'>read_vectored</a>(&amp;mut self, bufs: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.IoSliceMut.html" title="struct std::io::IoSliceMut">IoSliceMut</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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;</code><span class='since' title='Stable since Rust version 1.36.0'>1.36.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#558-560' title='goto source code'>[src]</a></h4><div class='docblock'><p>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></p>
</div><h4 id='method.initializer' class="method"><code id='initializer.v'>unsafe fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.initializer' class='fnname'>initializer</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Initializer.html" title="struct std::io::Initializer">Initializer</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#586-588' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab unstable'><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>read_initializer</code>)</div></div><div class='docblock'><p>Determines if this <code>Read</code>er can work with buffers of uninitialized memory. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.initializer">Read more</a></p>
</div><h4 id='method.read_to_end' class="method"><code id='read_to_end.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end' class='fnname'>read_to_end</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::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;</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#638-640' title='goto source code'>[src]</a></h4><div class='docblock'><p>Read 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></p>
</div><h4 id='method.read_to_string' class="method"><code id='read_to_string.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_string' class='fnname'>read_to_string</a>(&amp;mut self, buf: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::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;</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#681-692' title='goto source code'>[src]</a></h4><div class='docblock'><p>Read 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></p>
</div><h4 id='method.read_exact' class="method"><code id='read_exact.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact' class='fnname'>read_exact</a>(&amp;mut self, buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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;</code><span class='since' title='Stable since Rust version 1.6.0'>1.6.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#744-759' title='goto source code'>[src]</a></h4><div class='docblock'><p>Read 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></p>
</div><h4 id='method.by_ref' class="method"><code id='by_ref.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref' class='fnname'>by_ref</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#796' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a &quot;by reference&quot; adaptor for this instance of <code>Read</code>. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.by_ref">Read more</a></p>
</div><h4 id='method.bytes' class="method"><code id='bytes.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes' class='fnname'>bytes</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Bytes.html" title="struct std::io::Bytes">Bytes</a>&lt;Self&gt;</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#833-835' title='goto source code'>[src]</a></h4><div class='docblock'><p>Transforms this <code>Read</code> instance to an [<code>Iterator</code>] over its bytes. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.bytes">Read more</a></p>
</div><h4 id='method.chain' class="method"><code id='chain.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain' class='fnname'>chain</a>&lt;R&gt;(self, next: R) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Chain.html" title="struct std::io::Chain">Chain</a>&lt;Self, R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,&nbsp;</span></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#868-870' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates an adaptor which will chain this stream with another. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chain">Read more</a></p>
</div><h4 id='method.take' class="method"><code id='take.v'>fn <a href='https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/struct.Take.html" title="struct std::io::Take">Take</a>&lt;Self&gt;</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/std/io/mod.rs.html#904-906' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates an adaptor which will read at most <code>limit</code> bytes from it. <a href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.take">Read more</a></p>
</div></div></div>
<h2 id='foreign-impls' class='small-section-header'>Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a></h2><h3 id='impl-RngCore-for-BlockRng%3CR%3E' class='impl'><code class='in-band'>impl&lt;R&gt; <a class="trait" href="../rand/trait.RngCore.html" title="trait rand::RngCore">RngCore</a> for <a class="struct" href="../rand_core/block/struct.BlockRng.html" title="struct rand_core::block::BlockRng">BlockRng</a>&lt;R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="../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;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;R as <a class="trait" href="../rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&gt;::<a class="type" href="../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.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;R as <a class="trait" href="../rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&gt;::<a class="type" href="../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.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;,&nbsp;</span></code><a href='#impl-RngCore-for-BlockRng%3CR%3E' class='anchor'></a><a class='srclink' href='../src/rand_core/block.rs.html#171-237' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32' class="method hidden"><code id='next_u32.v-1'>fn <a href='#method.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand_core/block.rs.html#175-183' title='goto source code'>[src]</a></h4><h4 id='method.next_u64' class="method hidden"><code id='next_u64.v-1'>fn <a href='#method.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand_core/block.rs.html#186-215' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes' class="method hidden"><code id='fill_bytes.v-1'>fn <a href='#method.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand_core/block.rs.html#218-231' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes' class="method hidden"><code id='try_fill_bytes.v-1'>fn <a href='#method.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand_core/block.rs.html#234-236' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-for-Box%3CR%3E' class='impl'><code class='in-band'>impl&lt;R&gt; <a class="trait" href="../rand/trait.RngCore.html" title="trait 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; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="../rand/trait.RngCore.html" title="trait 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>,&nbsp;</span></code><a href='#impl-RngCore-for-Box%3CR%3E' class='anchor'></a><a class='srclink' href='../src/rand_core/lib.rs.html#415-435' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-1' class="method hidden"><code id='next_u32.v-2'>fn <a href='#method.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand_core/lib.rs.html#417-419' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-1' class="method hidden"><code id='next_u64.v-2'>fn <a href='#method.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand_core/lib.rs.html#422-424' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-1' class="method hidden"><code id='fill_bytes.v-2'>fn <a href='#method.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand_core/lib.rs.html#427-429' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-1' class="method hidden"><code id='try_fill_bytes.v-2'>fn <a href='#method.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand_core/lib.rs.html#432-434' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-for-BlockRng64%3CR%3E' class='impl'><code class='in-band'>impl&lt;R&gt; <a class="trait" href="../rand/trait.RngCore.html" title="trait rand::RngCore">RngCore</a> for <a class="struct" href="../rand_core/block/struct.BlockRng64.html" title="struct rand_core::block::BlockRng64">BlockRng64</a>&lt;R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="../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;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;R as <a class="trait" href="../rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&gt;::<a class="type" href="../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.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;R as <a class="trait" href="../rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&gt;::<a class="type" href="../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.AsMut.html" title="trait core::convert::AsMut">AsMut</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;,&nbsp;</span></code><a href='#impl-RngCore-for-BlockRng64%3CR%3E' class='anchor'></a><a class='srclink' href='../src/rand_core/block.rs.html#347-412' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-2' class="method hidden"><code id='next_u32.v-3'>fn <a href='#method.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand_core/block.rs.html#351-374' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-2' class="method hidden"><code id='next_u64.v-3'>fn <a href='#method.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand_core/block.rs.html#377-387' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-2' class="method hidden"><code id='fill_bytes.v-3'>fn <a href='#method.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand_core/block.rs.html#390-406' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-2' class="method hidden"><code id='try_fill_bytes.v-3'>fn <a href='#method.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand_core/block.rs.html#409-411' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-for-%26%27a%20mut%20R' class='impl'><code class='in-band'>impl&lt;'a, R&gt; <a class="trait" href="../rand/trait.RngCore.html" title="trait rand::RngCore">RngCore</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="../rand/trait.RngCore.html" title="trait 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>,&nbsp;</span></code><a href='#impl-RngCore-for-%26%27a%20mut%20R' class='anchor'></a><a class='srclink' href='../src/rand_core/lib.rs.html#389-409' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-3' class="method hidden"><code id='next_u32.v-4'>fn <a href='#method.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand_core/lib.rs.html#391-393' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-3' class="method hidden"><code id='next_u64.v-4'>fn <a href='#method.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand_core/lib.rs.html#396-398' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-3' class="method hidden"><code id='fill_bytes.v-4'>fn <a href='#method.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand_core/lib.rs.html#401-403' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-3' class="method hidden"><code id='try_fill_bytes.v-4'>fn <a href='#method.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand_core/lib.rs.html#406-408' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-for-ChaCha12Rng' class='impl'><code class='in-band'>impl <a class="trait" href="../rand/trait.RngCore.html" title="trait rand::RngCore">RngCore</a> for <a class="struct" href="../rand_chacha/chacha/struct.ChaCha12Rng.html" title="struct rand_chacha::chacha::ChaCha12Rng">ChaCha12Rng</a></code><a href='#impl-RngCore-for-ChaCha12Rng' class='anchor'></a><a class='srclink' href='../src/rand_chacha/chacha.rs.html#152-169' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-4' class="method hidden"><code id='next_u32.v-5'>fn <a href='#method.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#154-156' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-4' class="method hidden"><code id='next_u64.v-5'>fn <a href='#method.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#158-160' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-4' class="method hidden"><code id='fill_bytes.v-5'>fn <a href='#method.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#162-164' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-4' class="method hidden"><code id='try_fill_bytes.v-5'>fn <a href='#method.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#166-168' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-for-ChaCha8Rng' class='impl'><code class='in-band'>impl <a class="trait" href="../rand/trait.RngCore.html" title="trait rand::RngCore">RngCore</a> for <a class="struct" href="../rand_chacha/chacha/struct.ChaCha8Rng.html" title="struct rand_chacha::chacha::ChaCha8Rng">ChaCha8Rng</a></code><a href='#impl-RngCore-for-ChaCha8Rng' class='anchor'></a><a class='srclink' href='../src/rand_chacha/chacha.rs.html#152-169' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-5' class="method hidden"><code id='next_u32.v-6'>fn <a href='#method.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#154-156' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-5' class="method hidden"><code id='next_u64.v-6'>fn <a href='#method.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#158-160' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-5' class="method hidden"><code id='fill_bytes.v-6'>fn <a href='#method.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#162-164' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-5' class="method hidden"><code id='try_fill_bytes.v-6'>fn <a href='#method.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#166-168' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-for-ChaCha20Rng' class='impl'><code class='in-band'>impl <a class="trait" href="../rand/trait.RngCore.html" title="trait rand::RngCore">RngCore</a> for <a class="struct" href="../rand_chacha/chacha/struct.ChaCha20Rng.html" title="struct rand_chacha::chacha::ChaCha20Rng">ChaCha20Rng</a></code><a href='#impl-RngCore-for-ChaCha20Rng' class='anchor'></a><a class='srclink' href='../src/rand_chacha/chacha.rs.html#152-169' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-6' class="method hidden"><code id='next_u32.v-7'>fn <a href='#method.next_u32' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#154-156' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-6' class="method hidden"><code id='next_u64.v-7'>fn <a href='#method.next_u64' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#158-160' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-6' class="method hidden"><code id='fill_bytes.v-7'>fn <a href='#method.fill_bytes' class='fnname'>fill_bytes</a>(&amp;mut self, bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#162-164' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-6' class="method hidden"><code id='try_fill_bytes.v-7'>fn <a href='#method.try_fill_bytes' class='fnname'>try_fill_bytes</a>(&amp;mut self, bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand_chacha/chacha.rs.html#166-168' title='goto source code'>[src]</a></h4></div><span class='loading-content'>Loading content...</span>
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-RngCore' class='impl'><code class='in-band'>impl RngCore for <a class="struct" href="../rand/rngs/mock/struct.StepRng.html" title="struct rand::rngs::mock::StepRng">StepRng</a></code><a href='#impl-RngCore' class='anchor'></a><a class='srclink' href='../src/rand/rngs/mock.rs.html#41-63' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-7' class="method hidden"><code id='next_u32.v-8'>fn <a href='#method.next_u32-7' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand/rngs/mock.rs.html#43-45' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-7' class="method hidden"><code id='next_u64.v-8'>fn <a href='#method.next_u64-7' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand/rngs/mock.rs.html#48-52' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-7' class="method hidden"><code id='fill_bytes.v-8'>fn <a href='#method.fill_bytes-7' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand/rngs/mock.rs.html#55-57' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-7' class="method hidden"><code id='try_fill_bytes.v-8'>fn <a href='#method.try_fill_bytes-7' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand/rngs/mock.rs.html#60-62' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-1' class='impl'><code class='in-band'>impl RngCore for <a class="struct" href="../rand/rngs/struct.EntropyRng.html" title="struct rand::rngs::EntropyRng">EntropyRng</a></code><a href='#impl-RngCore-1' class='anchor'></a><a class='srclink' href='../src/rand/rngs/entropy.rs.html#46-62' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-8' class="method hidden"><code id='next_u32.v-9'>fn <a href='#method.next_u32-8' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand/rngs/entropy.rs.html#47-49' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-8' class="method hidden"><code id='next_u64.v-9'>fn <a href='#method.next_u64-8' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand/rngs/entropy.rs.html#51-53' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-8' class="method hidden"><code id='fill_bytes.v-9'>fn <a href='#method.fill_bytes-8' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand/rngs/entropy.rs.html#55-57' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-8' class="method hidden"><code id='try_fill_bytes.v-9'>fn <a href='#method.try_fill_bytes-8' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand/rngs/entropy.rs.html#59-61' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-2' class='impl'><code class='in-band'>impl RngCore for <a class="struct" href="../rand/rngs/struct.OsRng.html" title="struct rand::rngs::OsRng">OsRng</a></code><a href='#impl-RngCore-2' class='anchor'></a><a class='srclink' href='../src/rand/rngs/os.rs.html#62-81' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-9' class="method hidden"><code id='next_u32.v-10'>fn <a href='#method.next_u32-9' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand/rngs/os.rs.html#63-65' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-9' class="method hidden"><code id='next_u64.v-10'>fn <a href='#method.next_u64-9' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand/rngs/os.rs.html#67-69' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-9' class="method hidden"><code id='fill_bytes.v-10'>fn <a href='#method.fill_bytes-9' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand/rngs/os.rs.html#71-75' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-9' class="method hidden"><code id='try_fill_bytes.v-10'>fn <a href='#method.try_fill_bytes-9' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand/rngs/os.rs.html#77-80' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-3' class='impl'><code class='in-band'>impl RngCore for <a class="struct" href="../rand/rngs/struct.StdRng.html" title="struct rand::rngs::StdRng">StdRng</a></code><a href='#impl-RngCore-3' class='anchor'></a><a class='srclink' href='../src/rand/rngs/std.rs.html#36-56' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-10' class="method hidden"><code id='next_u32.v-11'>fn <a href='#method.next_u32-10' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand/rngs/std.rs.html#38-40' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-10' class="method hidden"><code id='next_u64.v-11'>fn <a href='#method.next_u64-10' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand/rngs/std.rs.html#43-45' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-10' class="method hidden"><code id='fill_bytes.v-11'>fn <a href='#method.fill_bytes-10' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand/rngs/std.rs.html#48-50' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-10' class="method hidden"><code id='try_fill_bytes.v-11'>fn <a href='#method.try_fill_bytes-10' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand/rngs/std.rs.html#53-55' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-4' class='impl'><code class='in-band'>impl RngCore for <a class="struct" href="../rand/rngs/struct.ThreadRng.html" title="struct rand::rngs::ThreadRng">ThreadRng</a></code><a href='#impl-RngCore-4' class='anchor'></a><a class='srclink' href='../src/rand/rngs/thread.rs.html#92-110' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-11' class="method hidden"><code id='next_u32.v-12'>fn <a href='#method.next_u32-11' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand/rngs/thread.rs.html#94-96' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-11' class="method hidden"><code id='next_u64.v-12'>fn <a href='#method.next_u64-11' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand/rngs/thread.rs.html#99-101' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-11' class="method hidden"><code id='fill_bytes.v-12'>fn <a href='#method.fill_bytes-11' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand/rngs/thread.rs.html#103-105' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-11' class="method hidden"><code id='try_fill_bytes.v-12'>fn <a href='#method.try_fill_bytes-11' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand/rngs/thread.rs.html#107-109' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-5' class='impl'><code class='in-band'>impl&lt;R, Rsdr:&nbsp;<a class="trait" href="../rand/trait.RngCore.html" title="trait rand::RngCore">RngCore</a>&gt; RngCore for <a class="struct" href="../rand/rngs/adapter/struct.ReseedingRng.html" title="struct rand::rngs::adapter::ReseedingRng">ReseedingRng</a>&lt;R, Rsdr&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="../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="../rand/trait.SeedableRng.html" title="trait rand::SeedableRng">SeedableRng</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;R as <a class="trait" href="../rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a>&gt;::<a class="type" href="../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.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>&gt;,&nbsp;</span></code><a href='#impl-RngCore-5' class='anchor'></a><a class='srclink' href='../src/rand/rngs/adapter/reseeding.rs.html#105-126' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-12' class="method hidden"><code id='next_u32.v-13'>fn <a href='#method.next_u32-12' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand/rngs/adapter/reseeding.rs.html#110-112' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-12' class="method hidden"><code id='next_u64.v-13'>fn <a href='#method.next_u64-12' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand/rngs/adapter/reseeding.rs.html#115-117' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-12' class="method hidden"><code id='fill_bytes.v-13'>fn <a href='#method.fill_bytes-12' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand/rngs/adapter/reseeding.rs.html#119-121' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-12' class="method hidden"><code id='try_fill_bytes.v-13'>fn <a href='#method.try_fill_bytes-12' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand/rngs/adapter/reseeding.rs.html#123-125' title='goto source code'>[src]</a></h4></div><h3 id='impl-RngCore-6' class='impl'><code class='in-band'>impl&lt;R:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>&gt; RngCore for <a class="struct" href="../rand/rngs/adapter/struct.ReadRng.html" title="struct rand::rngs::adapter::ReadRng">ReadRng</a>&lt;R&gt;</code><a href='#impl-RngCore-6' class='anchor'></a><a class='srclink' href='../src/rand/rngs/adapter/read.rs.html#60-79' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next_u32-13' class="method hidden"><code id='next_u32.v-14'>fn <a href='#method.next_u32-13' class='fnname'>next_u32</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/rand/rngs/adapter/read.rs.html#61-63' title='goto source code'>[src]</a></h4><h4 id='method.next_u64-13' class="method hidden"><code id='next_u64.v-14'>fn <a href='#method.next_u64-13' class='fnname'>next_u64</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../src/rand/rngs/adapter/read.rs.html#65-67' title='goto source code'>[src]</a></h4><h4 id='method.fill_bytes-13' class="method hidden"><code id='fill_bytes.v-14'>fn <a href='#method.fill_bytes-13' class='fnname'>fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../src/rand/rngs/adapter/read.rs.html#69-72' title='goto source code'>[src]</a></h4><h4 id='method.try_fill_bytes-13' class="method hidden"><code id='try_fill_bytes.v-14'>fn <a href='#method.try_fill_bytes-13' class='fnname'>try_fill_bytes</a>(&amp;mut self, dest: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</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="../rand/struct.Error.html" title="struct rand::Error">Error</a>&gt;</code><a class='srclink' href='../src/rand/rngs/adapter/read.rs.html#74-78' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
src="../implementors/rand_core/trait.RngCore.js">
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "rand";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>