diff options
Diffstat (limited to 'rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions')
47 files changed, 1294 insertions, 0 deletions
diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/bernoulli/enum.BernoulliError.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/bernoulli/enum.BernoulliError.html new file mode 100644 index 0000000..8f99e17 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/bernoulli/enum.BernoulliError.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/enum.BernoulliError.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/enum.BernoulliError.html">../../../rand/distributions/enum.BernoulliError.html</a>...</p> + <script>location.replace("../../../rand/distributions/enum.BernoulliError.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/bernoulli/struct.Bernoulli.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/bernoulli/struct.Bernoulli.html new file mode 100644 index 0000000..e46390a --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/bernoulli/struct.Bernoulli.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/struct.Bernoulli.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/struct.Bernoulli.html">../../../rand/distributions/struct.Bernoulli.html</a>...</p> + <script>location.replace("../../../rand/distributions/struct.Bernoulli.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/struct.DistIter.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/struct.DistIter.html new file mode 100644 index 0000000..fa75a92 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/struct.DistIter.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/struct.DistIter.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/struct.DistIter.html">../../../rand/distributions/struct.DistIter.html</a>...</p> + <script>location.replace("../../../rand/distributions/struct.DistIter.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/struct.DistMap.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/struct.DistMap.html new file mode 100644 index 0000000..52d8cde --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/struct.DistMap.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/struct.DistMap.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/struct.DistMap.html">../../../rand/distributions/struct.DistMap.html</a>...</p> + <script>location.replace("../../../rand/distributions/struct.DistMap.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/trait.DistString.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/trait.DistString.html new file mode 100644 index 0000000..72005a8 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/trait.DistString.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/trait.DistString.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/trait.DistString.html">../../../rand/distributions/trait.DistString.html</a>...</p> + <script>location.replace("../../../rand/distributions/trait.DistString.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/trait.Distribution.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/trait.Distribution.html new file mode 100644 index 0000000..83303bf --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/distribution/trait.Distribution.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/trait.Distribution.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/trait.Distribution.html">../../../rand/distributions/trait.Distribution.html</a>...</p> + <script>location.replace("../../../rand/distributions/trait.Distribution.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/enum.BernoulliError.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/enum.BernoulliError.html new file mode 100644 index 0000000..428736e --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/enum.BernoulliError.html @@ -0,0 +1,13 @@ +<!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="Error type returned from `Bernoulli::new`."><meta name="keywords" content="rust, rustlang, rust-lang, BernoulliError"><title>BernoulliError in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc enum"><!--[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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">BernoulliError</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block"><li><a href="#variant.InvalidProbability">InvalidProbability</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-BernoulliError">Clone</a></li><li><a href="#impl-Copy-for-BernoulliError">Copy</a></li><li><a href="#impl-Debug-for-BernoulliError">Debug</a></li><li><a href="#impl-Display-for-BernoulliError">Display</a></li><li><a href="#impl-Eq-for-BernoulliError">Eq</a></li><li><a href="#impl-Error-for-BernoulliError">Error</a></li><li><a href="#impl-PartialEq%3CBernoulliError%3E-for-BernoulliError">PartialEq<BernoulliError></a></li><li><a href="#impl-StructuralEq-for-BernoulliError">StructuralEq</a></li><li><a href="#impl-StructuralPartialEq-for-BernoulliError">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-BernoulliError">RefUnwindSafe</a></li><li><a href="#impl-Send-for-BernoulliError">Send</a></li><li><a href="#impl-Sync-for-BernoulliError">Sync</a></li><li><a href="#impl-Unpin-for-BernoulliError">Unpin</a></li><li><a href="#impl-UnwindSafe-for-BernoulliError">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-BernoulliError">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-BernoulliError">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-BernoulliError">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-BernoulliError">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-BernoulliError">Into<U></a></li><li><a href="#impl-Provider-for-BernoulliError">Provider</a></li><li><a href="#impl-ToOwned-for-BernoulliError">ToOwned</a></li><li><a href="#impl-ToString-for-BernoulliError">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-BernoulliError">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-BernoulliError">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-BernoulliError">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Enum <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="enum" href="#">BernoulliError</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/bernoulli.rs.html#70-73">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust enum"><code>pub enum BernoulliError { + InvalidProbability, +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Error type returned from <code>Bernoulli::new</code>.</p> +</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><h3 id="variant.InvalidProbability" class="variant small-section-header"><a href="#variant.InvalidProbability" class="anchor field"></a><code>InvalidProbability</code></h3><div class="docblock"><p><code>p < 0</code> or <code>p > 1</code>.</p> +</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#impl-Clone-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#impl-Debug-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Display-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#75-81">source</a><a href="#impl-Display-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#76-80">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Error-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#84">source</a><a href="#impl-Error-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.source" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#83">source</a></span><a href="#method.source" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.source" class="fnname">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)></h4></section></summary><div class='docblock'>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.source">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.description" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#109">source</a></span><a href="#method.description" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.description" class="fnname">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.42.0: use the Display impl or to_string()</span></div></span><div class='docblock'> <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.description">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cause" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#119">source</a></span><a href="#method.cause" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.cause" class="fnname">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.33.0: replaced by Error::source, which can support downcasting</span></div></span></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.provide" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#193">source</a><a href="#method.provide" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.provide" class="fnname">provide</a>(&'a self, demand: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.Demand.html" title="struct core::any::Demand">Demand</a><'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>error_generic_member_access</code>)</span></div></span><div class='docblock'>Provides type based access to context intended for error reports. <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.provide">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBernoulliError%3E-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#impl-PartialEq%3CBernoulliError%3E-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a>> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><section id="impl-Copy-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#impl-Copy-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section><section id="impl-Eq-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#impl-Eq-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section><section id="impl-StructuralEq-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#impl-StructuralEq-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralEq.html" title="trait core::marker::StructuralEq">StructuralEq</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section><section id="impl-StructuralPartialEq-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#69">source</a><a href="#impl-StructuralPartialEq-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-BernoulliError" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section><section id="impl-Send-for-BernoulliError" class="impl has-srclink"><a href="#impl-Send-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section><section id="impl-Sync-for-BernoulliError" class="impl has-srclink"><a href="#impl-Sync-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section><section id="impl-Unpin-for-BernoulliError" class="impl has-srclink"><a href="#impl-Unpin-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section><section id="impl-UnwindSafe-for-BernoulliError" class="impl has-srclink"><a href="#impl-UnwindSafe-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Provider-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#197">source</a><a href="#impl-Provider-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<E> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html" title="trait core::any::Provider">Provider</a> for E<span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.provide-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#201">source</a><a href="#method.provide-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html#tymethod.provide" class="fnname">provide</a>(&'a self, demand: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.Demand.html" title="struct core::any::Demand">Demand</a><'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>provide_any</code>)</span></div></span><div class='docblock'>Data providers should implement this method to provide <em>all</em> values they are able to +provide by using <code>demand</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html#tymethod.provide">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToString-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/string.rs.html#2526">source</a><a href="#impl-ToString-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/string.rs.html#2532">source</a><a href="#method.to_string" class="anchor"></a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-BernoulliError" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-BernoulliError" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/enum.WeightedError.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/enum.WeightedError.html new file mode 100644 index 0000000..c03171d --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/enum.WeightedError.html @@ -0,0 +1,20 @@ +<!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="Error type returned from `WeightedIndex::new`."><meta name="keywords" content="rust, rustlang, rust-lang, WeightedError"><title>WeightedError in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc enum"><!--[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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">WeightedError</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block"><li><a href="#variant.AllWeightsZero">AllWeightsZero</a></li><li><a href="#variant.InvalidWeight">InvalidWeight</a></li><li><a href="#variant.NoItem">NoItem</a></li><li><a href="#variant.TooMany">TooMany</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-WeightedError">Clone</a></li><li><a href="#impl-Copy-for-WeightedError">Copy</a></li><li><a href="#impl-Debug-for-WeightedError">Debug</a></li><li><a href="#impl-Display-for-WeightedError">Display</a></li><li><a href="#impl-Eq-for-WeightedError">Eq</a></li><li><a href="#impl-Error-for-WeightedError">Error</a></li><li><a href="#impl-PartialEq%3CWeightedError%3E-for-WeightedError">PartialEq<WeightedError></a></li><li><a href="#impl-StructuralEq-for-WeightedError">StructuralEq</a></li><li><a href="#impl-StructuralPartialEq-for-WeightedError">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-WeightedError">RefUnwindSafe</a></li><li><a href="#impl-Send-for-WeightedError">Send</a></li><li><a href="#impl-Sync-for-WeightedError">Sync</a></li><li><a href="#impl-Unpin-for-WeightedError">Unpin</a></li><li><a href="#impl-UnwindSafe-for-WeightedError">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-WeightedError">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-WeightedError">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-WeightedError">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-WeightedError">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-WeightedError">Into<U></a></li><li><a href="#impl-Provider-for-WeightedError">Provider</a></li><li><a href="#impl-ToOwned-for-WeightedError">ToOwned</a></li><li><a href="#impl-ToString-for-WeightedError">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-WeightedError">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-WeightedError">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-WeightedError">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Enum <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="enum" href="#">WeightedError</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/weighted_index.rs.html#431-444">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust enum"><code>pub enum WeightedError { + NoItem, + InvalidWeight, + AllWeightsZero, + TooMany, +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Error type returned from <code>WeightedIndex::new</code>.</p> +</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><h3 id="variant.NoItem" class="variant small-section-header"><a href="#variant.NoItem" class="anchor field"></a><code>NoItem</code></h3><div class="docblock"><p>The provided weight collection contains no items.</p> +</div><h3 id="variant.InvalidWeight" class="variant small-section-header"><a href="#variant.InvalidWeight" class="anchor field"></a><code>InvalidWeight</code></h3><div class="docblock"><p>A weight is either less than zero, greater than the supported maximum, +NaN, or otherwise invalid.</p> +</div><h3 id="variant.AllWeightsZero" class="variant small-section-header"><a href="#variant.AllWeightsZero" class="anchor field"></a><code>AllWeightsZero</code></h3><div class="docblock"><p>All items in the provided weight collection are zero.</p> +</div><h3 id="variant.TooMany" class="variant small-section-header"><a href="#variant.TooMany" class="anchor field"></a><code>TooMany</code></h3><div class="docblock"><p>Too many weights are provided (length greater than <code>u32::MAX</code>)</p> +</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-Clone-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-Debug-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Display-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#449-458">source</a><a href="#impl-Display-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#450-457">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Error-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#447">source</a><a href="#impl-Error-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.source" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#83">source</a></span><a href="#method.source" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.source" class="fnname">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)></h4></section></summary><div class='docblock'>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.source">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.description" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#109">source</a></span><a href="#method.description" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.description" class="fnname">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.42.0: use the Display impl or to_string()</span></div></span><div class='docblock'> <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.description">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cause" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#119">source</a></span><a href="#method.cause" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.cause" class="fnname">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.33.0: replaced by Error::source, which can support downcasting</span></div></span></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.provide" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#193">source</a><a href="#method.provide" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.provide" class="fnname">provide</a>(&'a self, demand: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.Demand.html" title="struct core::any::Demand">Demand</a><'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>error_generic_member_access</code>)</span></div></span><div class='docblock'>Provides type based access to context intended for error reports. <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.provide">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CWeightedError%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-PartialEq%3CWeightedError%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><section id="impl-Copy-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-Copy-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-Eq-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-Eq-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-StructuralEq-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-StructuralEq-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralEq.html" title="trait core::marker::StructuralEq">StructuralEq</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-StructuralPartialEq-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-StructuralPartialEq-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-WeightedError" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-Send-for-WeightedError" class="impl has-srclink"><a href="#impl-Send-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-Sync-for-WeightedError" class="impl has-srclink"><a href="#impl-Sync-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-Unpin-for-WeightedError" class="impl has-srclink"><a href="#impl-Unpin-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-UnwindSafe-for-WeightedError" class="impl has-srclink"><a href="#impl-UnwindSafe-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Provider-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#197">source</a><a href="#impl-Provider-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<E> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html" title="trait core::any::Provider">Provider</a> for E<span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.provide-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#201">source</a><a href="#method.provide-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html#tymethod.provide" class="fnname">provide</a>(&'a self, demand: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.Demand.html" title="struct core::any::Demand">Demand</a><'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>provide_any</code>)</span></div></span><div class='docblock'>Data providers should implement this method to provide <em>all</em> values they are able to +provide by using <code>demand</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html#tymethod.provide">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToString-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/string.rs.html#2526">source</a><a href="#impl-ToString-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/string.rs.html#2532">source</a><a href="#method.to_string" class="anchor"></a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/float/struct.Open01.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/float/struct.Open01.html new file mode 100644 index 0000000..d0747dc --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/float/struct.Open01.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/struct.Open01.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/struct.Open01.html">../../../rand/distributions/struct.Open01.html</a>...</p> + <script>location.replace("../../../rand/distributions/struct.Open01.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/float/struct.OpenClosed01.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/float/struct.OpenClosed01.html new file mode 100644 index 0000000..8a00205 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/float/struct.OpenClosed01.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/struct.OpenClosed01.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/struct.OpenClosed01.html">../../../rand/distributions/struct.OpenClosed01.html</a>...</p> + <script>location.replace("../../../rand/distributions/struct.OpenClosed01.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/index.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/index.html new file mode 100644 index 0000000..163d439 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/index.html @@ -0,0 +1,64 @@ +<!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="Generating random samples from probability distributions"><meta name="keywords" content="rust, rustlang, rust-lang, distributions"><title>rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod"><!--[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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Module distributions</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">rand</a>::<wbr><a class="mod" href="#">distributions</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/mod.rs.html#10-218">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generating random samples from probability distributions</p> +<p>This module is the home of the <a href="trait.Distribution.html" title="Distribution"><code>Distribution</code></a> trait and several of its +implementations. It is the workhorse behind some of the convenient +functionality of the <a href="../trait.Rng.html" title="Rng"><code>Rng</code></a> trait, e.g. <a href="../trait.Rng.html#method.gen" title="Rng::gen"><code>Rng::gen</code></a> and of course +<a href="../trait.Rng.html#method.sample" title="Rng::sample"><code>Rng::sample</code></a>.</p> +<p>Abstractly, a <a href="https://en.wikipedia.org/wiki/Probability_distribution">probability distribution</a> describes the probability of +occurrence of each value in its sample space.</p> +<p>More concretely, an implementation of <code>Distribution<T></code> for type <code>X</code> is an +algorithm for choosing values from the sample space (a subset of <code>T</code>) +according to the distribution <code>X</code> represents, using an external source of +randomness (an RNG supplied to the <code>sample</code> function).</p> +<p>A type <code>X</code> may implement <code>Distribution<T></code> for multiple types <code>T</code>. +Any type implementing <a href="trait.Distribution.html" title="Distribution"><code>Distribution</code></a> is stateless (i.e. immutable), +but it may have internal parameters set at construction time (for example, +<a href="struct.Uniform.html" title="Uniform"><code>Uniform</code></a> allows specification of its sample space as a range within <code>T</code>).</p> +<h2 id="the-standard-distribution"><a href="#the-standard-distribution">The <code>Standard</code> distribution</a></h2> +<p>The <a href="struct.Standard.html" title="Standard"><code>Standard</code></a> distribution is important to mention. This is the +distribution used by <a href="../trait.Rng.html#method.gen" title="Rng::gen"><code>Rng::gen</code></a> and represents the “default” way to +produce a random value for many different types, including most primitive +types, tuples, arrays, and a few derived types. See the documentation of +<a href="struct.Standard.html" title="Standard"><code>Standard</code></a> for more details.</p> +<p>Implementing <code>Distribution<T></code> for <a href="struct.Standard.html" title="Standard"><code>Standard</code></a> for user types <code>T</code> makes it +possible to generate type <code>T</code> with <a href="../trait.Rng.html#method.gen" title="Rng::gen"><code>Rng::gen</code></a>, and by extension also +with the <a href="../fn.random.html"><code>random</code></a> function.</p> +<h3 id="random-characters"><a href="#random-characters">Random characters</a></h3> +<p><a href="struct.Alphanumeric.html" title="Alphanumeric"><code>Alphanumeric</code></a> is a simple distribution to sample random letters and +numbers of the <code>char</code> type; in contrast <a href="struct.Standard.html" title="Standard"><code>Standard</code></a> may sample any valid +<code>char</code>.</p> +<h2 id="uniform-numeric-ranges"><a href="#uniform-numeric-ranges">Uniform numeric ranges</a></h2> +<p>The <a href="struct.Uniform.html" title="Uniform"><code>Uniform</code></a> distribution is more flexible than <a href="struct.Standard.html" title="Standard"><code>Standard</code></a>, but also +more specialised: it supports fewer target types, but allows the sample +space to be specified as an arbitrary range within its target type <code>T</code>. +Both <a href="struct.Standard.html" title="Standard"><code>Standard</code></a> and <a href="struct.Uniform.html" title="Uniform"><code>Uniform</code></a> are in some sense uniform distributions.</p> +<p>Values may be sampled from this distribution using [<code>Rng::sample(Range)</code>] or +by creating a distribution object with <a href="struct.Uniform.html#method.new" title="Uniform::new"><code>Uniform::new</code></a>, +<a href="struct.Uniform.html#method.new_inclusive" title="Uniform::new_inclusive"><code>Uniform::new_inclusive</code></a> or <code>From<Range></code>. When the range limits are not +known at compile time it is typically faster to reuse an existing +<code>Uniform</code> object than to call [<code>Rng::sample(Range)</code>].</p> +<p>User types <code>T</code> may also implement <code>Distribution<T></code> for <a href="struct.Uniform.html" title="Uniform"><code>Uniform</code></a>, +although this is less straightforward than for <a href="struct.Standard.html" title="Standard"><code>Standard</code></a> (see the +documentation in the <a href="uniform/index.html" title="uniform"><code>uniform</code></a> module). Doing so enables generation of +values of type <code>T</code> with [<code>Rng::sample(Range)</code>].</p> +<h3 id="open-and-half-open-ranges"><a href="#open-and-half-open-ranges">Open and half-open ranges</a></h3> +<p>There are surprisingly many ways to uniformly generate random floats. A +range between 0 and 1 is standard, but the exact bounds (open vs closed) +and accuracy differ. In addition to the <a href="struct.Standard.html" title="Standard"><code>Standard</code></a> distribution Rand offers +<a href="struct.Open01.html" title="Open01"><code>Open01</code></a> and <a href="struct.OpenClosed01.html" title="OpenClosed01"><code>OpenClosed01</code></a>. See “Floating point implementation” section of +<a href="struct.Standard.html" title="Standard"><code>Standard</code></a> documentation for more details.</p> +<h2 id="non-uniform-sampling"><a href="#non-uniform-sampling">Non-uniform sampling</a></h2> +<p>Sampling a simple true/false outcome with a given probability has a name: +the <a href="struct.Bernoulli.html" title="Bernoulli"><code>Bernoulli</code></a> distribution (this is used by <a href="../trait.Rng.html#method.gen_bool" title="Rng::gen_bool"><code>Rng::gen_bool</code></a>).</p> +<p>For weighted sampling from a sequence of discrete values, use the +<a href="weighted/struct.WeightedIndex.html" title="WeightedIndex"><code>WeightedIndex</code></a> distribution.</p> +<p>This crate no longer includes other non-uniform distributions; instead +it is recommended that you use either <a href="https://crates.io/crates/rand_distr"><code>rand_distr</code></a> or <a href="https://crates.io/crates/statrs"><code>statrs</code></a>.</p> +</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="uniform/index.html" title="rand::distributions::uniform mod">uniform</a></div><div class="item-right docblock-short">A distribution uniformly sampling numbers within a given range.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="weighted/index.html" title="rand::distributions::weighted mod">weighted</a><span class="stab deprecated" title="">Deprecated</span></div><div class="item-right docblock-short">Weighted index sampling</div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Alphanumeric.html" title="rand::distributions::Alphanumeric struct">Alphanumeric</a></div><div class="item-right docblock-short">Sample a <code>u8</code>, uniformly distributed over ASCII letters and numbers: +a-z, A-Z and 0-9.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Bernoulli.html" title="rand::distributions::Bernoulli struct">Bernoulli</a></div><div class="item-right docblock-short">The Bernoulli distribution.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DistIter.html" title="rand::distributions::DistIter struct">DistIter</a></div><div class="item-right docblock-short">An iterator that generates random values of <code>T</code> with distribution <code>D</code>, +using <code>R</code> as the source of randomness.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DistMap.html" title="rand::distributions::DistMap struct">DistMap</a></div><div class="item-right docblock-short">A distribution of values of type <code>S</code> derived from the distribution <code>D</code> +by mapping its output of type <code>T</code> through the closure <code>F</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Open01.html" title="rand::distributions::Open01 struct">Open01</a></div><div class="item-right docblock-short">A distribution to sample floating point numbers uniformly in the open +interval <code>(0, 1)</code>, i.e. not including either endpoint.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.OpenClosed01.html" title="rand::distributions::OpenClosed01 struct">OpenClosed01</a></div><div class="item-right docblock-short">A distribution to sample floating point numbers uniformly in the half-open +interval <code>(0, 1]</code>, i.e. including 1 but not 0.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Slice.html" title="rand::distributions::Slice struct">Slice</a></div><div class="item-right docblock-short">A distribution to sample items uniformly from a slice.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Standard.html" title="rand::distributions::Standard struct">Standard</a></div><div class="item-right docblock-short">A generic random value distribution, implemented for many primitive types. +Usually generates values with a numerically uniform distribution, and with a +range appropriate to the type.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Uniform.html" title="rand::distributions::Uniform struct">Uniform</a></div><div class="item-right docblock-short">Sample values uniformly between two bounds.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WeightedIndex.html" title="rand::distributions::WeightedIndex struct">WeightedIndex</a></div><div class="item-right docblock-short">A distribution using weighted sampling of discrete items</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.BernoulliError.html" title="rand::distributions::BernoulliError enum">BernoulliError</a></div><div class="item-right docblock-short">Error type returned from <code>Bernoulli::new</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.WeightedError.html" title="rand::distributions::WeightedError enum">WeightedError</a></div><div class="item-right docblock-short">Error type returned from <code>WeightedIndex::new</code>.</div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.DistString.html" title="rand::distributions::DistString trait">DistString</a></div><div class="item-right docblock-short"><code>String</code> sampler</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Distribution.html" title="rand::distributions::Distribution trait">Distribution</a></div><div class="item-right docblock-short">Types (distributions) that can be used to create a random instance of <code>T</code>.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/other/struct.Alphanumeric.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/other/struct.Alphanumeric.html new file mode 100644 index 0000000..2560edb --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/other/struct.Alphanumeric.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/struct.Alphanumeric.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/struct.Alphanumeric.html">../../../rand/distributions/struct.Alphanumeric.html</a>...</p> + <script>location.replace("../../../rand/distributions/struct.Alphanumeric.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/sidebar-items.js b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/sidebar-items.js new file mode 100644 index 0000000..3d6b831 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":[["BernoulliError","Error type returned from `Bernoulli::new`."],["WeightedError","Error type returned from `WeightedIndex::new`."]],"mod":[["uniform","A distribution uniformly sampling numbers within a given range."],["weighted","Weighted index sampling"]],"struct":[["Alphanumeric","Sample a `u8`, uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9."],["Bernoulli","The Bernoulli distribution."],["DistIter","An iterator that generates random values of `T` with distribution `D`, using `R` as the source of randomness."],["DistMap","A distribution of values of type `S` derived from the distribution `D` by mapping its output of type `T` through the closure `F`."],["Open01","A distribution to sample floating point numbers uniformly in the open interval `(0, 1)`, i.e. not including either endpoint."],["OpenClosed01","A distribution to sample floating point numbers uniformly in the half-open interval `(0, 1]`, i.e. including 1 but not 0."],["Slice","A distribution to sample items uniformly from a slice."],["Standard","A generic random value distribution, implemented for many primitive types. Usually generates values with a numerically uniform distribution, and with a range appropriate to the type."],["Uniform","Sample values uniformly between two bounds."],["WeightedIndex","A distribution using weighted sampling of discrete items"]],"trait":[["DistString","`String` sampler"],["Distribution","Types (distributions) that can be used to create a random instance of `T`."]]};
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/slice/struct.Slice.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/slice/struct.Slice.html new file mode 100644 index 0000000..729a322 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/slice/struct.Slice.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/struct.Slice.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/struct.Slice.html">../../../rand/distributions/struct.Slice.html</a>...</p> + <script>location.replace("../../../rand/distributions/struct.Slice.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Alphanumeric.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Alphanumeric.html new file mode 100644 index 0000000..c7690c4 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Alphanumeric.html @@ -0,0 +1,38 @@ +<!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="Sample a `u8`, uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9."><meta name="keywords" content="rust, rustlang, rust-lang, Alphanumeric"><title>Alphanumeric in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Alphanumeric</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Alphanumeric">Clone</a></li><li><a href="#impl-Copy-for-Alphanumeric">Copy</a></li><li><a href="#impl-Debug-for-Alphanumeric">Debug</a></li><li><a href="#impl-DistString-for-Alphanumeric">DistString</a></li><li><a href="#impl-Distribution%3Cu8%3E-for-Alphanumeric">Distribution<u8></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Alphanumeric">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Alphanumeric">Send</a></li><li><a href="#impl-Sync-for-Alphanumeric">Sync</a></li><li><a href="#impl-Unpin-for-Alphanumeric">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Alphanumeric">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Alphanumeric">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Alphanumeric">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Alphanumeric">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Alphanumeric">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Alphanumeric">Into<U></a></li><li><a href="#impl-ToOwned-for-Alphanumeric">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Alphanumeric">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Alphanumeric">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-Alphanumeric">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">Alphanumeric</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/other.rs.html#69">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Alphanumeric;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Sample a <code>u8</code>, uniformly distributed over ASCII letters and numbers: +a-z, A-Z and 0-9.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::{Rng, thread_rng}; +<span class="kw">use </span>rand::distributions::Alphanumeric; + +<span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng(); +<span class="kw">let </span>chars: String = (<span class="number">0</span>..<span class="number">7</span>).map(|<span class="kw">_</span>| rng.sample(Alphanumeric) <span class="kw">as </span>char).collect(); +<span class="macro">println!</span>(<span class="string">"Random chars: {}"</span>, chars);</code></pre></div> +<p>The <a href="trait.DistString.html" title="DistString"><code>DistString</code></a> trait provides an easier method of generating +a random <code>String</code>, and offers more efficient allocation:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::distributions::{Alphanumeric, DistString}; +<span class="kw">let </span>string = Alphanumeric.sample_string(<span class="kw-2">&mut </span>rand::thread_rng(), <span class="number">16</span>); +<span class="macro">println!</span>(<span class="string">"Random string: {}"</span>, string);</code></pre></div> +<h2 id="passwords"><a href="#passwords">Passwords</a></h2> +<p>Users sometimes ask whether it is safe to use a string of random characters +as a password. In principle, all RNGs in Rand implementing <code>CryptoRng</code> are +suitable as a source of randomness for generating passwords (if they are +properly seeded), but it is more conservative to only use randomness +directly from the operating system via the <code>getrandom</code> crate, or the +corresponding bindings of a crypto library.</p> +<p>When generating passwords or keys, it is important to consider the threat +model and in some cases the memorability of the password. This is out of +scope of the Rand project, and therefore we defer to the following +references:</p> +<ul> +<li><a href="https://en.wikipedia.org/wiki/Password_strength">Wikipedia article on Password Strength</a></li> +<li><a href="https://en.wikipedia.org/wiki/Diceware">Diceware for generating memorable passwords</a></li> +</ul> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#67">source</a><a href="#impl-Clone-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#67">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#67">source</a><a href="#impl-Debug-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#67">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-DistString-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#128-135">source</a><a href="#impl-DistString-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.DistString.html" title="trait rand::distributions::DistString">DistString</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.append_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#129-134">source</a><a href="#method.append_string" class="anchor"></a><h4 class="code-header">fn <a href="trait.DistString.html#tymethod.append_string" class="fnname">append_string</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(<br> &self,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R,<br> string: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,<br> len: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a><br>)</h4></section></summary><div class='docblock'>Append <code>len</code> random chars to <code>string</code></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#203-207">source</a><a href="#method.sample_string" class="anchor"></a><h4 class="code-header">fn <a href="trait.DistString.html#method.sample_string" class="fnname">sample_string</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R, len: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Generate a <code>String</code> of <code>len</code> random chars</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cu8%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#108-125">source</a><a href="#impl-Distribution%3Cu8%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#109-124">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><section id="impl-Copy-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#67">source</a><a href="#impl-Copy-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Alphanumeric" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section><section id="impl-Send-for-Alphanumeric" class="impl has-srclink"><a href="#impl-Send-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section><section id="impl-Sync-for-Alphanumeric" class="impl has-srclink"><a href="#impl-Sync-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section><section id="impl-Unpin-for-Alphanumeric" class="impl has-srclink"><a href="#impl-Unpin-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section><section id="impl-UnwindSafe-for-Alphanumeric" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Bernoulli.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Bernoulli.html new file mode 100644 index 0000000..450b61d --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Bernoulli.html @@ -0,0 +1,36 @@ +<!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 Bernoulli distribution."><meta name="keywords" content="rust, rustlang, rust-lang, Bernoulli"><title>Bernoulli in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Bernoulli</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.from_ratio">from_ratio</a></li><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Bernoulli">Clone</a></li><li><a href="#impl-Copy-for-Bernoulli">Copy</a></li><li><a href="#impl-Debug-for-Bernoulli">Debug</a></li><li><a href="#impl-Distribution%3Cbool%3E-for-Bernoulli">Distribution<bool></a></li><li><a href="#impl-PartialEq%3CBernoulli%3E-for-Bernoulli">PartialEq<Bernoulli></a></li><li><a href="#impl-StructuralPartialEq-for-Bernoulli">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Bernoulli">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Bernoulli">Send</a></li><li><a href="#impl-Sync-for-Bernoulli">Sync</a></li><li><a href="#impl-Unpin-for-Bernoulli">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Bernoulli">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Bernoulli">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Bernoulli">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Bernoulli">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Bernoulli">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Bernoulli">Into<U></a></li><li><a href="#impl-ToOwned-for-Bernoulli">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Bernoulli">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Bernoulli">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-Bernoulli">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">Bernoulli</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/bernoulli.rs.html#38-41">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Bernoulli { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The Bernoulli distribution.</p> +<p>This is a special case of the Binomial distribution where <code>n = 1</code>.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::distributions::{Bernoulli, Distribution}; + +<span class="kw">let </span>d = Bernoulli::new(<span class="number">0.3</span>).unwrap(); +<span class="kw">let </span>v = d.sample(<span class="kw-2">&mut </span>rand::thread_rng()); +<span class="macro">println!</span>(<span class="string">"{} is from a Bernoulli distribution"</span>, v);</code></pre></div> +<h2 id="precision"><a href="#precision">Precision</a></h2> +<p>This <code>Bernoulli</code> distribution uses 64 bits from the RNG (a <code>u64</code>), +so only probabilities that are multiples of 2<sup>-64</sup> can be +represented.</p> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#86-129">source</a><a href="#impl-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#98-108">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(p: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a>, <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a>></h4></section></summary><div class="docblock"><p>Construct a new <code>Bernoulli</code> with the given probability of success <code>p</code>.</p> +<h5 id="precision-1"><a href="#precision-1">Precision</a></h5> +<p>For <code>p = 1.0</code>, the resulting distribution will always generate true. +For <code>p = 0.0</code>, the resulting distribution will always generate false.</p> +<p>This method is accurate for any input <code>p</code> in the range <code>[0, 1]</code> which is +a multiple of 2<sup>-64</sup>. (Note that not all multiples of +2<sup>-64</sup> in <code>[0, 1]</code> can be represented as a <code>f64</code>.)</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_ratio" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#119-128">source</a><h4 class="code-header">pub fn <a href="#method.from_ratio" class="fnname">from_ratio</a>(<br> numerator: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>,<br> denominator: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a>, <a class="enum" href="enum.BernoulliError.html" title="enum rand::distributions::BernoulliError">BernoulliError</a>></h4></section></summary><div class="docblock"><p>Construct a new <code>Bernoulli</code> with the probability of success of +<code>numerator</code>-in-<code>denominator</code>. I.e. <code>new_ratio(2, 3)</code> will return +a <code>Bernoulli</code> with a 2-in-3 chance, or about 67%, of returning <code>true</code>.</p> +<p>return <code>true</code>. If <code>numerator == 0</code> it will always return <code>false</code>. +For <code>numerator > denominator</code> and <code>denominator == 0</code>, this returns an +error. Otherwise, for <code>numerator == denominator</code>, samples are always +true; for <code>numerator == 0</code> samples are always false.</p> +</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#36">source</a><a href="#impl-Clone-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#36">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#36">source</a><a href="#impl-Debug-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#36">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cbool%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#131-141">source</a><a href="#impl-Distribution%3Cbool%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#133-140">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBernoulli%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#36">source</a><a href="#impl-PartialEq%3CBernoulli%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a>> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#36">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><section id="impl-Copy-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#36">source</a><a href="#impl-Copy-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section><section id="impl-StructuralPartialEq-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#36">source</a><a href="#impl-StructuralPartialEq-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Bernoulli" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section><section id="impl-Send-for-Bernoulli" class="impl has-srclink"><a href="#impl-Send-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section><section id="impl-Sync-for-Bernoulli" class="impl has-srclink"><a href="#impl-Sync-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section><section id="impl-Unpin-for-Bernoulli" class="impl has-srclink"><a href="#impl-Unpin-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section><section id="impl-UnwindSafe-for-Bernoulli" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.DistIter.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.DistIter.html new file mode 100644 index 0000000..134a4ce --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.DistIter.html @@ -0,0 +1,43 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An iterator that generates random values of `T` with distribution `D`, using `R` as the source of randomness."><meta name="keywords" content="rust, rustlang, rust-lang, DistIter"><title>DistIter in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">DistIter</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-DistIter%3CD%2C%20R%2C%20T%3E">Debug</a></li><li><a href="#impl-FusedIterator-for-DistIter%3CD%2C%20R%2C%20T%3E">FusedIterator</a></li><li><a href="#impl-Iterator-for-DistIter%3CD%2C%20R%2C%20T%3E">Iterator</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-DistIter%3CD%2C%20R%2C%20T%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-DistIter%3CD%2C%20R%2C%20T%3E">Send</a></li><li><a href="#impl-Sync-for-DistIter%3CD%2C%20R%2C%20T%3E">Sync</a></li><li><a href="#impl-Unpin-for-DistIter%3CD%2C%20R%2C%20T%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-DistIter%3CD%2C%20R%2C%20T%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-DistIter%3CD%2C%20R%2C%20T%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E">Into<U></a></li><li><a href="#impl-IntoIterator-for-DistIter%3CD%2C%20R%2C%20T%3E">IntoIterator</a></li><li><a href="#impl-IteratorRandom-for-DistIter%3CD%2C%20R%2C%20T%3E">IteratorRandom</a></li><li><a href="#impl-TryFrom%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-DistIter%3CD%2C%20R%2C%20T%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">DistIter</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/distribution.rs.html#129-133">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct DistIter<D, R, T> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An iterator that generates random values of <code>T</code> with distribution <code>D</code>, +using <code>R</code> as the source of randomness.</p> +<p>This <code>struct</code> is created by the <a href="trait.Distribution.html#method.sample_iter"><code>sample_iter</code></a> method on <a href="trait.Distribution.html" title="Distribution"><code>Distribution</code></a>. +See its documentation for more.</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#128">source</a><a href="#impl-Debug-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#128">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Iterator-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#135-153">source</a><a href="#impl-Iterator-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.next" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#143-148">source</a><a href="#method.next" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#tymethod.next" class="fnname">next</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T></h4></section></summary><div class='docblock'>Advances the iterator and returns the next value. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#tymethod.next">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.size_hint" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#150-152">source</a><a href="#method.size_hint" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.size_hint" class="fnname">size_hint</a>(&self) -> (<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>, <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>>)</h4></section></summary><div class='docblock'>Returns the bounds on the remaining length of the iterator. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.size_hint">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.next_chunk" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#138-142">source</a><a href="#method.next_chunk" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.next_chunk" class="fnname">next_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>>(<br> &mut self<br>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><[Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>; <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">N</a>], <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/array/iter/struct.IntoIter.html" title="struct core::array::iter::IntoIter">IntoIter</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, N>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_next_chunk</code>)</span></div></span><div class='docblock'>Advances the iterator and returns an array containing the next <code>N</code> values. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.next_chunk">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.count" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#252-254">source</a></span><a href="#method.count" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.count" class="fnname">count</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Consumes the iterator, counting the number of iterations and returning it. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.count">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#282-284">source</a></span><a href="#method.last" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.last" class="fnname">last</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Consumes the iterator, returning the last element. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.last">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.advance_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#328">source</a><a href="#method.advance_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.advance_by" class="fnname">advance_by</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.unit.html">()</a>, <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</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>iter_advance_by</code>)</span></div></span><div class='docblock'>Advances the iterator by <code>n</code> elements. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.advance_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.nth" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#376">source</a></span><a href="#method.nth" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.nth" class="fnname">nth</a>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>></h4></section></summary><div class='docblock'>Returns the <code>n</code>th element of the iterator. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.nth">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.step_by" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.28.0">1.28.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#428-430">source</a></span><a href="#method.step_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.step_by" class="fnname">step_by</a>(self, step: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/step_by/struct.StepBy.html" title="struct core::iter::adapters::step_by::StepBy">StepBy</a><Self><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.step_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chain" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#499-502">source</a></span><a href="#method.chain" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.chain" class="fnname">chain</a><U>(self, other: U) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/chain/struct.Chain.html" title="struct core::iter::adapters::chain::Chain">Chain</a><Self, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,</span></h4></section></summary><div class='docblock'>Takes two iterators and creates a new iterator over both in sequence. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.chain">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.zip" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#617-620">source</a></span><a href="#method.zip" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.zip" class="fnname">zip</a><U>(self, other: U) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/zip/struct.Zip.html" title="struct core::iter::adapters::zip::Zip">Zip</a><Self, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,</span></h4></section></summary><div class='docblock'>‘Zips up’ two iterators into a single iterator of pairs. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.zip">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.intersperse_with" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#717-720">source</a><a href="#method.intersperse_with" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.intersperse_with" class="fnname">intersperse_with</a><G>(self, separator: G) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/intersperse/struct.IntersperseWith.html" title="struct core::iter::adapters::intersperse::IntersperseWith">IntersperseWith</a><Self, G><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> G: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_intersperse</code>)</span></div></span><div class='docblock'>Creates a new iterator which places an item generated by <code>separator</code> +between adjacent items of the original iterator. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.intersperse_with">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#776-779">source</a></span><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.map" class="fnname">map</a><B, F>(self, f: F) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/map/struct.Map.html" title="struct core::iter::adapters::map::Map">Map</a><Self, F><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> B,</span></h4></section></summary><div class='docblock'>Takes a closure and creates an iterator which calls that closure on each +element. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.for_each" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#821-824">source</a></span><a href="#method.for_each" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.for_each" class="fnname">for_each</a><F>(self, f: F)<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>),</span></h4></section></summary><div class='docblock'>Calls a closure on each element of an iterator. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.for_each">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.filter" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#896-899">source</a></span><a href="#method.filter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.filter" class="fnname">filter</a><P>(self, predicate: P) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/filter/struct.Filter.html" title="struct core::iter::adapters::filter::Filter">Filter</a><Self, P><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator which uses a closure to determine if an element +should be yielded. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.filter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.filter_map" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#941-944">source</a></span><a href="#method.filter_map" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.filter_map" class="fnname">filter_map</a><B, F>(self, f: F) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/filter_map/struct.FilterMap.html" title="struct core::iter::adapters::filter_map::FilterMap">FilterMap</a><Self, F><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B>,</span></h4></section></summary><div class='docblock'>Creates an iterator that both filters and maps. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.filter_map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.enumerate" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#987-989">source</a></span><a href="#method.enumerate" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.enumerate" class="fnname">enumerate</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/enumerate/struct.Enumerate.html" title="struct core::iter::adapters::enumerate::Enumerate">Enumerate</a><Self><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator which gives the current iteration count as well as +the next value. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.enumerate">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.peekable" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1058-1060">source</a></span><a href="#method.peekable" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.peekable" class="fnname">peekable</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/peekable/struct.Peekable.html" title="struct core::iter::adapters::peekable::Peekable">Peekable</a><Self><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator which can use the <a href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/peekable/struct.Peekable.html#method.peek"><code>peek</code></a> and <a href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/peekable/struct.Peekable.html#method.peek_mut"><code>peek_mut</code></a> methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.peekable">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.skip_while" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1123-1126">source</a></span><a href="#method.skip_while" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.skip_while" class="fnname">skip_while</a><P>(self, predicate: P) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/skip_while/struct.SkipWhile.html" title="struct core::iter::adapters::skip_while::SkipWhile">SkipWhile</a><Self, P><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator that <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.skip"><code>skip</code></a>s elements based on a predicate. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.skip_while">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_while" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1204-1207">source</a></span><a href="#method.take_while" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.take_while" class="fnname">take_while</a><P>(self, predicate: P) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/take_while/struct.TakeWhile.html" title="struct core::iter::adapters::take_while::TakeWhile">TakeWhile</a><Self, P><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator that yields elements based on a predicate. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.take_while">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map_while" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.57.0">1.57.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1292-1295">source</a></span><a href="#method.map_while" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.map_while" class="fnname">map_while</a><B, P>(self, predicate: P) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/map_while/struct.MapWhile.html" title="struct core::iter::adapters::map_while::MapWhile">MapWhile</a><Self, P><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B>,</span></h4></section></summary><div class='docblock'>Creates an iterator that both yields elements based on a predicate and maps. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.map_while">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.skip" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1323-1325">source</a></span><a href="#method.skip" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.skip" class="fnname">skip</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/skip/struct.Skip.html" title="struct core::iter::adapters::skip::Skip">Skip</a><Self><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator that skips the first <code>n</code> elements. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.skip">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1376-1378">source</a></span><a href="#method.take" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.take" class="fnname">take</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/take/struct.Take.html" title="struct core::iter::adapters::take::Take">Take</a><Self><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator that yields the first <code>n</code> elements, or fewer +if the underlying iterator ends sooner. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.take">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.scan" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1420-1423">source</a></span><a href="#method.scan" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.scan" class="fnname">scan</a><St, B, F>(self, initial_state: St, f: F) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/scan/struct.Scan.html" title="struct core::iter::adapters::scan::Scan">Scan</a><Self, St, F><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>St, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B>,</span></h4></section></summary><div class='docblock'>An iterator adapter similar to <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.fold"><code>fold</code></a> that holds internal state and +produces a new iterator. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.scan">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flat_map" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1460-1464">source</a></span><a href="#method.flat_map" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.flat_map" class="fnname">flat_map</a><U, F>(self, f: F) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/flatten/struct.FlatMap.html" title="struct core::iter::adapters::flatten::FlatMap">FlatMap</a><Self, U, F><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> U,</span></h4></section></summary><div class='docblock'>Creates an iterator that works like map, but flattens nested structure. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.flat_map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fuse" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1600-1602">source</a></span><a href="#method.fuse" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.fuse" class="fnname">fuse</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/fuse/struct.Fuse.html" title="struct core::iter::adapters::fuse::Fuse">Fuse</a><Self><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Creates an iterator which ends after the first <a href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html#variant.None" title="None"><code>None</code></a>. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.fuse">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.inspect" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1684-1687">source</a></span><a href="#method.inspect" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.inspect" class="fnname">inspect</a><F>(self, f: F) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/inspect/struct.Inspect.html" title="struct core::iter::adapters::inspect::Inspect">Inspect</a><Self, F><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>),</span></h4></section></summary><div class='docblock'>Does something with each element of an iterator, passing the value on. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.inspect">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.by_ref" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1714-1716">source</a></span><a href="#method.by_ref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.by_ref" class="fnname">by_ref</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>Self<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Borrows an iterator, rather than consuming it. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.by_ref">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.collect" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1832-1834">source</a></span><a href="#method.collect" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.collect" class="fnname">collect</a><B>(self) -> B<span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Transforms an iterator into a collection. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.collect">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.collect_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#1983-1985">source</a><a href="#method.collect_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.collect_into" class="fnname">collect_into</a><E>(self, collection: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>E) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>E<span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_collect_into</code>)</span></div></span><div class='docblock'>Collects all the items from an iterator into a collection. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.collect_into">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2017-2021">source</a></span><a href="#method.partition" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.partition" class="fnname">partition</a><B, F>(self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(B, B)</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Consumes an iterator, creating two collections from it. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.partition">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_partitioned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2136-2139">source</a><a href="#method.is_partitioned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.is_partitioned" class="fnname">is_partitioned</a><P>(self, predicate: P) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_is_partitioned</code>)</span></div></span><div class='docblock'>Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return <code>true</code> precede all those that return <code>false</code>. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.is_partitioned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_fold" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2230-2234">source</a></span><a href="#method.try_fold" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.try_fold" class="fnname">try_fold</a><B, F, R>(&mut self, init: B, f: F) -> R<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(B, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> R,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a><Output = B>,</span></h4></section></summary><div class='docblock'>An iterator method that applies a function as long as it returns +successfully, producing a single, final value. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.try_fold">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_for_each" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2288-2292">source</a></span><a href="#method.try_for_each" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.try_for_each" class="fnname">try_for_each</a><F, R>(&mut self, f: F) -> R<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> R,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a><Output = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.unit.html">()</a>>,</span></h4></section></summary><div class='docblock'>An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.try_for_each">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fold" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2407-2410">source</a></span><a href="#method.fold" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.fold" class="fnname">fold</a><B, F>(self, init: B, f: F) -> B<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(B, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> B,</span></h4></section></summary><div class='docblock'>Folds every element into an accumulator by applying an operation, +returning the final result. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.fold">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reduce" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2444-2447">source</a></span><a href="#method.reduce" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.reduce" class="fnname">reduce</a><F>(self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>,</span></h4></section></summary><div class='docblock'>Reduces the elements to a single one, by repeatedly applying a reducing +operation. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.reduce">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_reduce" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2515-2520">source</a><a href="#method.try_reduce" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.try_reduce" class="fnname">try_reduce</a><F, R>(<br> &mut self,<br> f: F<br>) -> <<R as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a> as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<R as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html#associatedtype.Output" title="type core::ops::try_trait::Try::Output">Output</a>>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Residual.html#associatedtype.TryType" title="type core::ops::try_trait::Residual::TryType">TryType</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> R,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a><Output = Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,<br> <R as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iterator_try_reduce</code>)</span></div></span><div class='docblock'>Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.try_reduce">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.all" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2572-2575">source</a></span><a href="#method.all" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.all" class="fnname">all</a><F>(&mut self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Tests if every element of the iterator matches a predicate. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.all">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.any" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2625-2628">source</a></span><a href="#method.any" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.any" class="fnname">any</a><F>(&mut self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Tests if any element of the iterator matches a predicate. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.any">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2685-2688">source</a></span><a href="#method.find" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.find" class="fnname">find</a><P>(&mut self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Searches for an element of an iterator that satisfies a predicate. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.find">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.find_map" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2716-2719">source</a></span><a href="#method.find_map" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.find_map" class="fnname">find_map</a><B, F>(&mut self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><B>,</span></h4></section></summary><div class='docblock'>Applies function to the elements of iterator and returns +the first non-none result. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.find_map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_find" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2772-2777">source</a><a href="#method.try_find" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.try_find" class="fnname">try_find</a><F, R>(<br> &mut self,<br> f: F<br>) -> <<R as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a> as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Residual.html#associatedtype.TryType" title="type core::ops::try_trait::Residual::TryType">TryType</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> R,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a><Output = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>>,<br> <R as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html" title="trait core::ops::try_trait::Try">Try</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Try.html#associatedtype.Residual" title="type core::ops::try_trait::Try::Residual">Residual</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/try_trait/trait.Residual.html" title="trait core::ops::try_trait::Residual">Residual</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>try_find</code>)</span></div></span><div class='docblock'>Applies function to the elements of iterator and returns +the first true result or the first error. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.try_find">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.position" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#2854-2857">source</a></span><a href="#method.position" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.position" class="fnname">position</a><P>(&mut self, predicate: P) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><div class='docblock'>Searches for an element in an iterator, returning its index. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.position">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_by_key" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3022-3025">source</a></span><a href="#method.max_by_key" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.max_by_key" class="fnname">max_by_key</a><B, F>(self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> B,</span></h4></section></summary><div class='docblock'>Returns the element that gives the maximum value from the +specified function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.max_by_key">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_by" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.15.0">1.15.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3055-3058">source</a></span><a href="#method.max_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.max_by" class="fnname">max_by</a><F>(self, compare: F) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class='docblock'>Returns the element that gives the maximum value with respect to the +specified comparison function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.max_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min_by_key" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3082-3085">source</a></span><a href="#method.min_by_key" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.min_by_key" class="fnname">min_by_key</a><B, F>(self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> B: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> B,</span></h4></section></summary><div class='docblock'>Returns the element that gives the minimum value from the +specified function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.min_by_key">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min_by" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.15.0">1.15.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3115-3118">source</a></span><a href="#method.min_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.min_by" class="fnname">min_by</a><F>(self, compare: F) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class='docblock'>Returns the element that gives the minimum value with respect to the +specified comparison function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.min_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.unzip" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3190-3194">source</a></span><a href="#method.unzip" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.unzip" class="fnname">unzip</a><A, B, FromA, FromB>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(FromA, FromB)</a><span class="where fmt-newline">where<br> FromA: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><A>,<br> FromB: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><B>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B)</a>>,</span></h4></section></summary><div class='docblock'>Converts an iterator of pairs into a pair of containers. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.unzip">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copied" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.36.0">1.36.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3222-3225">source</a></span><a href="#method.copied" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.copied" class="fnname">copied</a><'a, T>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/copied/struct.Copied.html" title="struct core::iter::adapters::copied::Copied">Copied</a><Self><span class="where fmt-newline">where<br> T: 'a + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>T>,</span></h4></section></summary><div class='docblock'>Creates an iterator which copies all of its elements. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.copied">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cloned" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3269-3272">source</a></span><a href="#method.cloned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.cloned" class="fnname">cloned</a><'a, T>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/cloned/struct.Cloned.html" title="struct core::iter::adapters::cloned::Cloned">Cloned</a><Self><span class="where fmt-newline">where<br> T: 'a + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>T>,</span></h4></section></summary><div class='docblock'>Creates an iterator which <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone"><code>clone</code></a>s all of its elements. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.cloned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_chunks" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3346-3348">source</a><a href="#method.array_chunks" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.array_chunks" class="fnname">array_chunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/iter/adapters/array_chunks/struct.ArrayChunks.html" title="struct core::iter::adapters::array_chunks::ArrayChunks">ArrayChunks</a><Self, N><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_array_chunks</code>)</span></div></span><div class='docblock'>Returns an iterator over <code>N</code> elements of the iterator at a time. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.array_chunks">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sum" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3376-3379">source</a></span><a href="#method.sum" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.sum" class="fnname">sum</a><S>(self) -> S<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> S: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/accum/trait.Sum.html" title="trait core::iter::traits::accum::Sum">Sum</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,</span></h4></section></summary><div class='docblock'>Sums the elements of an iterator. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.sum">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.product" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.11.0">1.11.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3405-3408">source</a></span><a href="#method.product" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.product" class="fnname">product</a><P>(self) -> P<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/accum/trait.Product.html" title="trait core::iter::traits::accum::Product">Product</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>>,</span></h4></section></summary><div class='docblock'>Iterates over the entire iterator, multiplying all the elements <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.product">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3455-3459">source</a><a href="#method.cmp_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.cmp_by" class="fnname">cmp_by</a><I, F>(self, other: I, cmp: F) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, <I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'><a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those +of another with respect to the specified comparison function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.cmp_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3493-3497">source</a></span><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp" class="fnname">partial_cmp</a><I>(self, other: I) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'><a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those +of another. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3531-3535">source</a><a href="#method.partial_cmp_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp_by" class="fnname">partial_cmp_by</a><I, F>(self, other: I, partial_cmp: F) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, <I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'><a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html#lexicographical-comparison">Lexicographically</a> compares the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> with those +of another with respect to the specified comparison function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.partial_cmp_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3564-3568">source</a></span><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.eq" class="fnname">eq</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are equal to those of +another. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3589-3593">source</a><a href="#method.eq_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.eq_by" class="fnname">eq_by</a><I, F>(self, other: I, eq: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, <I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>iter_order_by</code>)</span></div></span><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are equal to those of +another with respect to the specified equality function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.eq_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3621-3625">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.ne" class="fnname">ne</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are unequal to those of +another. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.ne">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3642-3646">source</a></span><a href="#method.lt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.lt" class="fnname">lt</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a> +less than those of another. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3663-3667">source</a></span><a href="#method.le" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.le" class="fnname">le</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a> +less or equal to those of another. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3684-3688">source</a></span><a href="#method.gt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.gt" class="fnname">gt</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a> +greater than those of another. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3705-3709">source</a></span><a href="#method.ge" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.ge" class="fnname">ge</a><I>(self, other: I) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Determines if the elements of this <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="Iterator"><code>Iterator</code></a> are <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Ord.html#lexicographical-comparison">lexicographically</a> +greater than or equal to those of another. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.ge">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3764-3767">source</a><a href="#method.is_sorted_by" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by" class="fnname">is_sorted_by</a><F>(self, compare: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>, &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span><div class='docblock'>Checks if the elements of this iterator are sorted using the given comparator function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by_key" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/iterator.rs.html#3810-3814">source</a><a href="#method.is_sorted_by_key" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by_key" class="fnname">is_sorted_by_key</a><F, K>(self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>) -> K,<br> K: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><K>,</span></h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span><div class='docblock'>Checks if the elements of this iterator are sorted using the given key extraction +function. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#method.is_sorted_by_key">Read more</a></div></details></div></details><section id="impl-FusedIterator-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#155-160">source</a><a href="#impl-FusedIterator-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/marker/trait.FusedIterator.html" title="trait core::iter::traits::marker::FusedIterator">FusedIterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a href="#impl-Send-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a href="#impl-Sync-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a href="#impl-Unpin-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,<br> R: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-IntoIterator-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/collect.rs.html#267">source</a><a href="#impl-IntoIterator-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for I<span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <I as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = I</h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/90603" title="Tracking issue for const_intoiterator_identity">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/iter/traits/collect.rs.html#272">source</a></span><a href="#method.into_iter" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fnname">into_iter</a>(self) -> I</h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-IteratorRandom-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/seq/mod.rs.html#615">source</a><a href="#impl-IteratorRandom-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<I> <a class="trait" href="../seq/trait.IteratorRandom.html" title="trait rand::seq::IteratorRandom">IteratorRandom</a> for I<span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.choose" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/seq/mod.rs.html#304-353">source</a><a href="#method.choose" class="anchor"></a><h4 class="code-header">fn <a href="../seq/trait.IteratorRandom.html#method.choose" class="fnname">choose</a><R>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Choose one element at random from the iterator. <a href="../seq/trait.IteratorRandom.html#method.choose">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.choose_stable" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/seq/mod.rs.html#373-411">source</a><a href="#method.choose_stable" class="anchor"></a><h4 class="code-header">fn <a href="../seq/trait.IteratorRandom.html#method.choose_stable" class="fnname">choose_stable</a><R>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Choose one element at random from the iterator. <a href="../seq/trait.IteratorRandom.html#method.choose_stable">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.choose_multiple_fill" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/seq/mod.rs.html#426-448">source</a><a href="#method.choose_multiple_fill" class="anchor"></a><h4 class="code-header">fn <a href="../seq/trait.IteratorRandom.html#method.choose_multiple_fill" class="fnname">choose_multiple_fill</a><R>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R, buf: &mut [Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>]) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Collects values at random from the iterator into a supplied buffer +until that buffer is filled. <a href="../seq/trait.IteratorRandom.html#method.choose_multiple_fill">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.choose_multiple" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/seq/mod.rs.html#466-488">source</a><a href="#method.choose_multiple" class="anchor"></a><h4 class="code-header">fn <a href="../seq/trait.IteratorRandom.html#method.choose_multiple" class="fnname">choose_multiple</a><R>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R, amount: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::traits::iterator::Iterator::Item">Item</a>><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Collects <code>amount</code> values at random from the iterator into a vector. <a href="../seq/trait.IteratorRandom.html#method.choose_multiple">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-DistIter%3CD%2C%20R%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.DistMap.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.DistMap.html new file mode 100644 index 0000000..308adaa --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.DistMap.html @@ -0,0 +1,12 @@ +<!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="A distribution of values of type `S` derived from the distribution `D` by mapping its output of type `T` through the closure `F`."><meta name="keywords" content="rust, rustlang, rust-lang, DistMap"><title>DistMap in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">DistMap</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">Debug</a></li><li><a href="#impl-Distribution%3CS%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">Distribution<S></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">Send</a></li><li><a href="#impl-Sync-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">Sync</a></li><li><a href="#impl-Unpin-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">DistMap</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/distribution.rs.html#176-180">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct DistMap<D, F, T, S> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A distribution of values of type <code>S</code> derived from the distribution <code>D</code> +by mapping its output of type <code>T</code> through the closure <code>F</code>.</p> +<p>This <code>struct</code> is created by the <a href="trait.Distribution.html#method.map" title="Distribution::map"><code>Distribution::map</code></a> method. +See its documentation for more.</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#175">source</a><a href="#impl-Debug-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, S: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><D, F, T, S></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#175">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CS%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#182-190">source</a><a href="#impl-Distribution%3CS%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D, F, T, S> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><S> for <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><D, F, T, S><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#187-189">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> S</h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D, F, T, S> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><D, F, T, S><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a href="#impl-Send-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D, F, T, S> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><D, F, T, S><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a href="#impl-Sync-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D, F, T, S> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><D, F, T, S><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a href="#impl-Unpin-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D, F, T, S> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><D, F, T, S><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D, F, T, S> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><D, F, T, S><span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Open01.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Open01.html new file mode 100644 index 0000000..27dfd08 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Open01.html @@ -0,0 +1,24 @@ +<!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="A distribution to sample floating point numbers uniformly in the open interval `(0, 1)`, i.e. not including either endpoint."><meta name="keywords" content="rust, rustlang, rust-lang, Open01"><title>Open01 in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Open01</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Open01">Clone</a></li><li><a href="#impl-Copy-for-Open01">Copy</a></li><li><a href="#impl-Debug-for-Open01">Debug</a></li><li><a href="#impl-Distribution%3Cf32%3E-for-Open01">Distribution<f32></a></li><li><a href="#impl-Distribution%3Cf64%3E-for-Open01">Distribution<f64></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Open01">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Open01">Send</a></li><li><a href="#impl-Sync-for-Open01">Sync</a></li><li><a href="#impl-Unpin-for-Open01">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Open01">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Open01">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Open01">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Open01">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Open01">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Open01">Into<U></a></li><li><a href="#impl-ToOwned-for-Open01">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Open01">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Open01">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-Open01">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">Open01</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/float.rs.html#73">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Open01;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A distribution to sample floating point numbers uniformly in the open +interval <code>(0, 1)</code>, i.e. not including either endpoint.</p> +<p>All values that can be generated are of the form <code>n * ε + ε/2</code>. For <code>f32</code> +the 23 most significant random bits of an <code>u32</code> are used, for <code>f64</code> 52 from +an <code>u64</code>. The conversion uses a transmute-based method.</p> +<p>See also: <a href="struct.Standard.html"><code>Standard</code></a> which samples from <code>[0, 1)</code>, <a href="struct.OpenClosed01.html"><code>OpenClosed01</code></a> +which samples from <code>(0, 1]</code> and <a href="struct.Uniform.html"><code>Uniform</code></a> which samples from arbitrary +ranges.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::{thread_rng, Rng}; +<span class="kw">use </span>rand::distributions::Open01; + +<span class="kw">let </span>val: f32 = thread_rng().sample(Open01); +<span class="macro">println!</span>(<span class="string">"f32 from (0, 1): {}"</span>, val);</code></pre></div> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#71">source</a><a href="#impl-Clone-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#71">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#71">source</a><a href="#impl-Debug-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#71">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cf32%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#impl-Distribution%3Cf32%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cf64%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#impl-Distribution%3Cf64%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#method.sample-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><section id="impl-Copy-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#71">source</a><a href="#impl-Copy-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Open01" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section><section id="impl-Send-for-Open01" class="impl has-srclink"><a href="#impl-Send-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section><section id="impl-Sync-for-Open01" class="impl has-srclink"><a href="#impl-Sync-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section><section id="impl-Unpin-for-Open01" class="impl has-srclink"><a href="#impl-Unpin-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section><section id="impl-UnwindSafe-for-Open01" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Open01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-Open01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.OpenClosed01.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.OpenClosed01.html new file mode 100644 index 0000000..0cdffb0 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.OpenClosed01.html @@ -0,0 +1,25 @@ +<!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="A distribution to sample floating point numbers uniformly in the half-open interval `(0, 1]`, i.e. including 1 but not 0."><meta name="keywords" content="rust, rustlang, rust-lang, OpenClosed01"><title>OpenClosed01 in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">OpenClosed01</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-OpenClosed01">Clone</a></li><li><a href="#impl-Copy-for-OpenClosed01">Copy</a></li><li><a href="#impl-Debug-for-OpenClosed01">Debug</a></li><li><a href="#impl-Distribution%3Cf32%3E-for-OpenClosed01">Distribution<f32></a></li><li><a href="#impl-Distribution%3Cf64%3E-for-OpenClosed01">Distribution<f64></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-OpenClosed01">RefUnwindSafe</a></li><li><a href="#impl-Send-for-OpenClosed01">Send</a></li><li><a href="#impl-Sync-for-OpenClosed01">Sync</a></li><li><a href="#impl-Unpin-for-OpenClosed01">Unpin</a></li><li><a href="#impl-UnwindSafe-for-OpenClosed01">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-OpenClosed01">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-OpenClosed01">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-OpenClosed01">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-OpenClosed01">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-OpenClosed01">Into<U></a></li><li><a href="#impl-ToOwned-for-OpenClosed01">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-OpenClosed01">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-OpenClosed01">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-OpenClosed01">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">OpenClosed01</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/float.rs.html#46">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct OpenClosed01;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A distribution to sample floating point numbers uniformly in the half-open +interval <code>(0, 1]</code>, i.e. including 1 but not 0.</p> +<p>All values that can be generated are of the form <code>n * ε/2</code>. For <code>f32</code> +the 24 most significant random bits of a <code>u32</code> are used and for <code>f64</code> the +53 most significant bits of a <code>u64</code> are used. The conversion uses the +multiplicative method.</p> +<p>See also: <a href="struct.Standard.html"><code>Standard</code></a> which samples from <code>[0, 1)</code>, <a href="struct.Open01.html"><code>Open01</code></a> +which samples from <code>(0, 1)</code> and <a href="struct.Uniform.html"><code>Uniform</code></a> which samples from arbitrary +ranges.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::{thread_rng, Rng}; +<span class="kw">use </span>rand::distributions::OpenClosed01; + +<span class="kw">let </span>val: f32 = thread_rng().sample(OpenClosed01); +<span class="macro">println!</span>(<span class="string">"f32 from (0, 1): {}"</span>, val);</code></pre></div> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#44">source</a><a href="#impl-Clone-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#44">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#44">source</a><a href="#impl-Debug-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#44">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cf32%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#impl-Distribution%3Cf32%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cf64%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#impl-Distribution%3Cf64%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#method.sample-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><section id="impl-Copy-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#44">source</a><a href="#impl-Copy-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-OpenClosed01" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section><section id="impl-Send-for-OpenClosed01" class="impl has-srclink"><a href="#impl-Send-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section><section id="impl-Sync-for-OpenClosed01" class="impl has-srclink"><a href="#impl-Sync-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section><section id="impl-Unpin-for-OpenClosed01" class="impl has-srclink"><a href="#impl-Unpin-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section><section id="impl-UnwindSafe-for-OpenClosed01" class="impl has-srclink"><a href="#impl-UnwindSafe-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Slice.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Slice.html new file mode 100644 index 0000000..0a17e40 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Slice.html @@ -0,0 +1,49 @@ +<!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="A distribution to sample items uniformly from a slice."><meta name="keywords" content="rust, rustlang, rust-lang, Slice"><title>Slice in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Slice</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Slice%3C%27a%2C%20T%3E">Clone</a></li><li><a href="#impl-Copy-for-Slice%3C%27a%2C%20T%3E">Copy</a></li><li><a href="#impl-Debug-for-Slice%3C%27a%2C%20T%3E">Debug</a></li><li><a href="#impl-Distribution%3C%26%27a%20T%3E-for-Slice%3C%27a%2C%20T%3E">Distribution<&'a T></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Slice%3C%27a%2C%20T%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Slice%3C%27a%2C%20T%3E">Send</a></li><li><a href="#impl-Sync-for-Slice%3C%27a%2C%20T%3E">Sync</a></li><li><a href="#impl-Unpin-for-Slice%3C%27a%2C%20T%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Slice%3C%27a%2C%20T%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Slice%3C%27a%2C%20T%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Slice%3C%27a%2C%20T%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Slice%3C%27a%2C%20T%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Slice%3C%27a%2C%20T%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Slice%3C%27a%2C%20T%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-Slice%3C%27a%2C%20T%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Slice%3C%27a%2C%20T%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Slice%3C%27a%2C%20T%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-Slice%3C%27a%2C%20T%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">Slice</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/slice.rs.html#65-68">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Slice<'a, T> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A distribution to sample items uniformly from a slice.</p> +<p><a href="struct.Slice.html#method.new" title="Slice::new"><code>Slice::new</code></a> constructs a distribution referencing a slice and uniformly +samples references from the items in the slice. It may do extra work up +front to make sampling of multiple values faster; if only one sample from +the slice is required, <a href="../seq/trait.SliceRandom.html#tymethod.choose"><code>SliceRandom::choose</code></a> can be more efficient.</p> +<p>Steps are taken to avoid bias which might be present in naive +implementations; for example <code>slice[rng.gen() % slice.len()]</code> samples from +the slice, but may be more likely to select numbers in the low range than +other values.</p> +<p>This distribution samples with replacement; each sample is independent. +Sampling without replacement requires state to be retained, and therefore +cannot be handled by a distribution; you should instead consider methods +on <a href="../seq/trait.SliceRandom.html"><code>SliceRandom</code></a>, such as <a href="../seq/trait.SliceRandom.html#tymethod.choose_multiple"><code>SliceRandom::choose_multiple</code></a>.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::Rng; +<span class="kw">use </span>rand::distributions::Slice; + +<span class="kw">let </span>vowels = [<span class="string">'a'</span>, <span class="string">'e'</span>, <span class="string">'i'</span>, <span class="string">'o'</span>, <span class="string">'u'</span>]; +<span class="kw">let </span>vowels_dist = Slice::new(<span class="kw-2">&</span>vowels).unwrap(); +<span class="kw">let </span>rng = rand::thread_rng(); + +<span class="comment">// build a string of 10 vowels +</span><span class="kw">let </span>vowel_string: String = rng + .sample_iter(<span class="kw-2">&</span>vowels_dist) + .take(<span class="number">10</span>) + .collect(); + +<span class="macro">println!</span>(<span class="string">"{}"</span>, vowel_string); +<span class="macro">assert_eq!</span>(vowel_string.len(), <span class="number">10</span>); +<span class="macro">assert!</span>(vowel_string.chars().all(|c| vowels.contains(<span class="kw-2">&</span>c)));</code></pre></div> +<p>For a single sample, <a href="../seq/trait.SliceRandom.html#tymethod.choose" title="crate::seq::SliceRandom::choose"><code>SliceRandom::choose</code></a> +may be preferred:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::seq::SliceRandom; + +<span class="kw">let </span>vowels = [<span class="string">'a'</span>, <span class="string">'e'</span>, <span class="string">'i'</span>, <span class="string">'o'</span>, <span class="string">'u'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>rng = rand::thread_rng(); + +<span class="macro">println!</span>(<span class="string">"{}"</span>, vowels.choose(<span class="kw-2">&mut </span>rng).unwrap())</code></pre></div> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#70-82">source</a><a href="#impl-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T> <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#73-81">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(slice: &'a <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, EmptySlice></h4></section></summary><div class="docblock"><p>Create a new <code>Slice</code> instance which samples uniformly from the slice. +Returns <code>Err</code> if the slice is empty.</p> +</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#64">source</a><a href="#impl-Clone-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#64">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#64">source</a><a href="#impl-Debug-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#64">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%26%27a%20T%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#84-100">source</a><a href="#impl-Distribution%3C%26%27a%20T%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>T> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#85-99">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>T</h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><section id="impl-Copy-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#64">source</a><a href="#impl-Copy-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a href="#impl-Send-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Sync-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a href="#impl-Sync-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T></h3></section><section id="impl-UnwindSafe-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Standard.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Standard.html new file mode 100644 index 0000000..2a0b9da --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Standard.html @@ -0,0 +1,216 @@ +<!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="A generic random value distribution, implemented for many primitive types. Usually generates values with a numerically uniform distribution, and with a range appropriate to the type."><meta name="keywords" content="rust, rustlang, rust-lang, Standard"><title>Standard in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Standard</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Standard">Clone</a></li><li><a href="#impl-Copy-for-Standard">Copy</a></li><li><a href="#impl-Debug-for-Standard">Debug</a></li><li><a href="#impl-DistString-for-Standard">DistString</a></li><li><a href="#impl-Distribution%3C%5BT%3B%200%5D%3E-for-Standard">Distribution<[T; 0]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%201%5D%3E-for-Standard">Distribution<[T; 1]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2010%5D%3E-for-Standard">Distribution<[T; 10]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2011%5D%3E-for-Standard">Distribution<[T; 11]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2012%5D%3E-for-Standard">Distribution<[T; 12]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2013%5D%3E-for-Standard">Distribution<[T; 13]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2014%5D%3E-for-Standard">Distribution<[T; 14]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2015%5D%3E-for-Standard">Distribution<[T; 15]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2016%5D%3E-for-Standard">Distribution<[T; 16]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2017%5D%3E-for-Standard">Distribution<[T; 17]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2018%5D%3E-for-Standard">Distribution<[T; 18]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2019%5D%3E-for-Standard">Distribution<[T; 19]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%202%5D%3E-for-Standard">Distribution<[T; 2]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2020%5D%3E-for-Standard">Distribution<[T; 20]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2021%5D%3E-for-Standard">Distribution<[T; 21]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2022%5D%3E-for-Standard">Distribution<[T; 22]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2023%5D%3E-for-Standard">Distribution<[T; 23]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2024%5D%3E-for-Standard">Distribution<[T; 24]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2025%5D%3E-for-Standard">Distribution<[T; 25]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2026%5D%3E-for-Standard">Distribution<[T; 26]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2027%5D%3E-for-Standard">Distribution<[T; 27]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2028%5D%3E-for-Standard">Distribution<[T; 28]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2029%5D%3E-for-Standard">Distribution<[T; 29]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%203%5D%3E-for-Standard">Distribution<[T; 3]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2030%5D%3E-for-Standard">Distribution<[T; 30]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2031%5D%3E-for-Standard">Distribution<[T; 31]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%2032%5D%3E-for-Standard">Distribution<[T; 32]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%204%5D%3E-for-Standard">Distribution<[T; 4]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%205%5D%3E-for-Standard">Distribution<[T; 5]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%206%5D%3E-for-Standard">Distribution<[T; 6]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%207%5D%3E-for-Standard">Distribution<[T; 7]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%208%5D%3E-for-Standard">Distribution<[T; 8]></a></li><li><a href="#impl-Distribution%3C%5BT%3B%209%5D%3E-for-Standard">Distribution<[T; 9]></a></li><li><a href="#impl-Distribution%3C()%3E-for-Standard">Distribution<()></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K%2C%20L)%3E-for-Standard">Distribution<(A, B, C, D, E, F, G, H, I, J, K, L)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K)%3E-for-Standard">Distribution<(A, B, C, D, E, F, G, H, I, J, K)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J)%3E-for-Standard">Distribution<(A, B, C, D, E, F, G, H, I, J)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I)%3E-for-Standard">Distribution<(A, B, C, D, E, F, G, H, I)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H)%3E-for-Standard">Distribution<(A, B, C, D, E, F, G, H)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G)%3E-for-Standard">Distribution<(A, B, C, D, E, F, G)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F)%3E-for-Standard">Distribution<(A, B, C, D, E, F)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E-for-Standard">Distribution<(A, B, C, D, E)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D)%3E-for-Standard">Distribution<(A, B, C, D)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B%2C%20C)%3E-for-Standard">Distribution<(A, B, C)></a></li><li><a href="#impl-Distribution%3C(A%2C%20B)%3E-for-Standard">Distribution<(A, B)></a></li><li><a href="#impl-Distribution%3C(A%2C)%3E-for-Standard">Distribution<(A,)></a></li><li><a href="#impl-Distribution%3CNonZeroU128%3E-for-Standard">Distribution<NonZeroU128></a></li><li><a href="#impl-Distribution%3CNonZeroU16%3E-for-Standard">Distribution<NonZeroU16></a></li><li><a href="#impl-Distribution%3CNonZeroU32%3E-for-Standard">Distribution<NonZeroU32></a></li><li><a href="#impl-Distribution%3CNonZeroU64%3E-for-Standard">Distribution<NonZeroU64></a></li><li><a href="#impl-Distribution%3CNonZeroU8%3E-for-Standard">Distribution<NonZeroU8></a></li><li><a href="#impl-Distribution%3CNonZeroUsize%3E-for-Standard">Distribution<NonZeroUsize></a></li><li><a href="#impl-Distribution%3COption%3CT%3E%3E-for-Standard">Distribution<Option<T>></a></li><li><a href="#impl-Distribution%3CWrapping%3CT%3E%3E-for-Standard">Distribution<Wrapping<T>></a></li><li><a href="#impl-Distribution%3Cbool%3E-for-Standard">Distribution<bool></a></li><li><a href="#impl-Distribution%3Cchar%3E-for-Standard">Distribution<char></a></li><li><a href="#impl-Distribution%3Cf32%3E-for-Standard">Distribution<f32></a></li><li><a href="#impl-Distribution%3Cf64%3E-for-Standard">Distribution<f64></a></li><li><a href="#impl-Distribution%3Ci128%3E-for-Standard">Distribution<i128></a></li><li><a href="#impl-Distribution%3Ci16%3E-for-Standard">Distribution<i16></a></li><li><a href="#impl-Distribution%3Ci32%3E-for-Standard">Distribution<i32></a></li><li><a href="#impl-Distribution%3Ci64%3E-for-Standard">Distribution<i64></a></li><li><a href="#impl-Distribution%3Ci8%3E-for-Standard">Distribution<i8></a></li><li><a href="#impl-Distribution%3Cisize%3E-for-Standard">Distribution<isize></a></li><li><a href="#impl-Distribution%3Cu128%3E-for-Standard">Distribution<u128></a></li><li><a href="#impl-Distribution%3Cu16%3E-for-Standard">Distribution<u16></a></li><li><a href="#impl-Distribution%3Cu32%3E-for-Standard">Distribution<u32></a></li><li><a href="#impl-Distribution%3Cu64%3E-for-Standard">Distribution<u64></a></li><li><a href="#impl-Distribution%3Cu8%3E-for-Standard">Distribution<u8></a></li><li><a href="#impl-Distribution%3Cusize%3E-for-Standard">Distribution<usize></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Standard">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Standard">Send</a></li><li><a href="#impl-Sync-for-Standard">Sync</a></li><li><a href="#impl-Unpin-for-Standard">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Standard">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Standard">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Standard">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Standard">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Standard">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Standard">Into<U></a></li><li><a href="#impl-ToOwned-for-Standard">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Standard">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Standard">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-Standard">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">Standard</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/mod.rs.html#218">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Standard;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A generic random value distribution, implemented for many primitive types. +Usually generates values with a numerically uniform distribution, and with a +range appropriate to the type.</p> +<h3 id="provided-implementations"><a href="#provided-implementations">Provided implementations</a></h3> +<p>Assuming the provided <code>Rng</code> is well-behaved, these implementations +generate values with the following ranges and distributions:</p> +<ul> +<li>Integers (<code>i32</code>, <code>u32</code>, <code>isize</code>, <code>usize</code>, etc.): Uniformly distributed +over all values of the type.</li> +<li><code>char</code>: Uniformly distributed over all Unicode scalar values, i.e. all +code points in the range <code>0...0x10_FFFF</code>, except for the range +<code>0xD800...0xDFFF</code> (the surrogate code points). This includes +unassigned/reserved code points.</li> +<li><code>bool</code>: Generates <code>false</code> or <code>true</code>, each with probability 0.5.</li> +<li>Floating point types (<code>f32</code> and <code>f64</code>): Uniformly distributed in the +half-open range <code>[0, 1)</code>. See notes below.</li> +<li>Wrapping integers (<code>Wrapping<T></code>), besides the type identical to their +normal integer variants.</li> +</ul> +<p>The <code>Standard</code> distribution also supports generation of the following +compound types where all component types are supported:</p> +<ul> +<li>Tuples (up to 12 elements): each element is generated sequentially.</li> +<li>Arrays (up to 32 elements): each element is generated sequentially; +see also <a href="../trait.Rng.html#method.fill" title="Rng::fill"><code>Rng::fill</code></a> which supports arbitrary array length for integer +and float types and tends to be faster for <code>u32</code> and smaller types. +When using <code>rustc</code> ≥ 1.51, enable the <code>min_const_gen</code> feature to support +arrays larger than 32 elements. +Note that <a href="../trait.Rng.html#method.fill" title="Rng::fill"><code>Rng::fill</code></a> and <code>Standard</code>’s array support are <em>not</em> equivalent: +the former is optimised for integer types (using fewer RNG calls for +element types smaller than the RNG word size), while the latter supports +any element type supported by <code>Standard</code>.</li> +<li><code>Option<T></code> first generates a <code>bool</code>, and if true generates and returns +<code>Some(value)</code> where <code>value: T</code>, otherwise returning <code>None</code>.</li> +</ul> +<h3 id="custom-implementations"><a href="#custom-implementations">Custom implementations</a></h3> +<p>The <a href="struct.Standard.html" title="Standard"><code>Standard</code></a> distribution may be implemented for user types as follows:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::Rng; +<span class="kw">use </span>rand::distributions::{Distribution, Standard}; + +<span class="kw">struct </span>MyF32 { + x: f32, +} + +<span class="kw">impl </span>Distribution<MyF32> <span class="kw">for </span>Standard { + <span class="kw">fn </span>sample<R: Rng + <span class="question-mark">?</span>Sized>(<span class="kw-2">&</span><span class="self">self</span>, rng: <span class="kw-2">&mut </span>R) -> MyF32 { + MyF32 { x: rng.gen() } + } +}</code></pre></div> +<h3 id="example-usage"><a href="#example-usage">Example usage</a></h3> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::prelude::<span class="kw-2">*</span>; +<span class="kw">use </span>rand::distributions::Standard; + +<span class="kw">let </span>val: f32 = StdRng::from_entropy().sample(Standard); +<span class="macro">println!</span>(<span class="string">"f32 from [0, 1): {}"</span>, val);</code></pre></div> +<h2 id="floating-point-implementation"><a href="#floating-point-implementation">Floating point implementation</a></h2> +<p>The floating point implementations for <code>Standard</code> generate a random value in +the half-open interval <code>[0, 1)</code>, i.e. including 0 but not 1.</p> +<p>All values that can be generated are of the form <code>n * ε/2</code>. For <code>f32</code> +the 24 most significant random bits of a <code>u32</code> are used and for <code>f64</code> the +53 most significant bits of a <code>u64</code> are used. The conversion uses the +multiplicative method: <code>(rng.gen::<$uty>() >> N) as $ty * (ε/2)</code>.</p> +<p>See also: <a href="struct.Open01.html" title="Open01"><code>Open01</code></a> which samples from <code>(0, 1)</code>, <a href="struct.OpenClosed01.html" title="OpenClosed01"><code>OpenClosed01</code></a> which +samples from <code>(0, 1]</code> and <code>Rng::gen_range(0..1)</code> which also samples from +<code>[0, 1)</code>. Note that <code>Open01</code> uses transmute-based methods which yield 1 bit +less precision but may perform faster on some architectures (on modern Intel +CPUs all methods have approximately equal performance).</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/mod.rs.html#216">source</a><a href="#impl-Clone-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/mod.rs.html#216">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/mod.rs.html#216">source</a><a href="#impl-Debug-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/mod.rs.html#216">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-DistString-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#98-106">source</a><a href="#impl-DistString-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.DistString.html" title="trait rand::distributions::DistString">DistString</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="docblock"><p>Note: the <code>String</code> is potentially left with excess capacity; optionally the +user may call <code>string.shrink_to_fit()</code> afterwards.</p> +</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.append_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#99-105">source</a><a href="#method.append_string" class="anchor"></a><h4 class="code-header">fn <a href="trait.DistString.html#tymethod.append_string" class="fnname">append_string</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R, s: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, len: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Append <code>len</code> random chars to <code>string</code></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#203-207">source</a><a href="#method.sample_string" class="anchor"></a><h4 class="code-header">fn <a href="trait.DistString.html#method.sample_string" class="fnname">sample_string</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R, len: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Generate a <code>String</code> of <code>len</code> random chars</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%200%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%200%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 0]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-35" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-35" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 0]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-35" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-35" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-35" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-35" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%201%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%201%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 1]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-36" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-36" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 1]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-36" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-36" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-36" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-36" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2010%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2010%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 10]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-45" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-45" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 10]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-45" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-45" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-45" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-45" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2011%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2011%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 11]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-46" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-46" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 11]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-46" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-46" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-46" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-46" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2012%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2012%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 12]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-47" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-47" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 12]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-47" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-47" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-47" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-47" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2013%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2013%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 13]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-48" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-48" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 13]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-48" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-48" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-48" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-48" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2014%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2014%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 14]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-49" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-49" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 14]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-49" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-49" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-49" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-49" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2015%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2015%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 15]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-50" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-50" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 15]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-50" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-50" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-50" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-50" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2016%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2016%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 16]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-51" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-51" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 16]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-51" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-51" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-51" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-51" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2017%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2017%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 17]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-52" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-52" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 17]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-52" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-52" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-52" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-52" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2018%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2018%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 18]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-53" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-53" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 18]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-53" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-53" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-53" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-53" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2019%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2019%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 19]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-54" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-54" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 19]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-54" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-54" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-54" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-54" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%202%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%202%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 2]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-37" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-37" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 2]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-37" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-37" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-37" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-37" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2020%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2020%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 20]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-55" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-55" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 20]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-55" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-55" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-55" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-55" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2021%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2021%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 21]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-56" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-56" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 21]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-56" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-56" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-56" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-56" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2022%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2022%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 22]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-57" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-57" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 22]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-57" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-57" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-57" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-57" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2023%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2023%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 23]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-58" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-58" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 23]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-58" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-58" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-58" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-58" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2024%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2024%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 24]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-59" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-59" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 24]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-59" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-59" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-59" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-59" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2025%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2025%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 25]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-60" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-60" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 25]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-60" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-60" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-60" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-60" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2026%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2026%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 26]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-61" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-61" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 26]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-61" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-61" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-61" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-61" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2027%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2027%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 27]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-62" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-62" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 27]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-62" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-62" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-62" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-62" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2028%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2028%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 28]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-63" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-63" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 28]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-63" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-63" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-63" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-63" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2029%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2029%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 29]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 29]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-64" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%203%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%203%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 3]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-38" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-38" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 3]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-38" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-38" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-38" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-38" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2030%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2030%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 30]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-65" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-65" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 30]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-65" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-65" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-65" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-65" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2031%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2031%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 31]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-66" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-66" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 31]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-66" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-66" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-66" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-66" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%2032%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2032%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 32]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-67" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-67" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 32]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-67" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-67" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-67" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-67" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%204%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%204%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 4]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-39" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-39" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 4]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-39" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-39" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-39" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-39" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%205%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%205%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 5]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-40" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-40" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 5]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-40" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-40" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-40" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-40" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%206%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%206%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 6]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-41" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-41" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 6]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-41" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-41" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-41" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-41" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%207%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%207%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 7]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-42" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-42" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 7]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-42" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-42" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-42" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-42" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%208%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%208%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 8]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-43" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-43" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 8]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-43" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-43" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-43" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-43" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C%5BT%3B%209%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%209%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 9]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-44" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#method.sample-44" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 9]</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-44" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-44" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-44" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-44" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C()%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#172-178">source</a><a href="#impl-Distribution%3C()%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.unit.html">()</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-22" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#175-177">source</a><a href="#method.sample-22" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R)</h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-22" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-22" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-22" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-22" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K%2C%20L)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#190">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K%2C%20L)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K, L> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><I>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><J>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><K>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><L>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-34" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#190">source</a><a href="#method.sample-34" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(<br> &self,<br> _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-34" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-34" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-34" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-34" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#189">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><I>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><J>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><K>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-33" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#189">source</a><a href="#method.sample-33" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(<br> &self,<br> _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-33" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-33" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-33" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-33" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#188">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><I>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><J>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#188">source</a><a href="#method.sample-32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-32" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#187">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><I>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-31" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#187">source</a><a href="#method.sample-31" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-31" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-31" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-31" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-31" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#186">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-30" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#186">source</a><a href="#method.sample-30" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-30" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-30" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-30" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-30" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#185">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-29" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#185">source</a><a href="#method.sample-29" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-29" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-29" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-29" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-29" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#184">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-28" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#184">source</a><a href="#method.sample-28" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-28" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-28" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-28" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-28" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#183">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-27" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#183">source</a><a href="#method.sample-27" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-27" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-27" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-27" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-27" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#182">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-26" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#182">source</a><a href="#method.sample-26" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-26" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-26" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-26" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-26" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B%2C%20C)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#181">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-25" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#181">source</a><a href="#method.sample-25" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-25" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-25" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-25" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-25" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C%20B)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#180">source</a><a href="#impl-Distribution%3C(A%2C%20B)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-24" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#180">source</a><a href="#method.sample-24" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-24" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-24" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-24" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-24" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3C(A%2C)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#179">source</a><a href="#impl-Distribution%3C(A%2C)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A,)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-23" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#179">source</a><a href="#method.sample-23" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, _rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A,)</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-23" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-23" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-23" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-23" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CNonZeroU128%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#109">source</a><a href="#impl-Distribution%3CNonZeroU128%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU128.html" title="struct core::num::nonzero::NonZeroU128">NonZeroU128</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-18" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#109">source</a><a href="#method.sample-18" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU128.html" title="struct core::num::nonzero::NonZeroU128">NonZeroU128</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-18" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-18" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-18" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-18" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CNonZeroU16%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#106">source</a><a href="#impl-Distribution%3CNonZeroU16%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU16.html" title="struct core::num::nonzero::NonZeroU16">NonZeroU16</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-15" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#106">source</a><a href="#method.sample-15" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU16.html" title="struct core::num::nonzero::NonZeroU16">NonZeroU16</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-15" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-15" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-15" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-15" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CNonZeroU32%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#107">source</a><a href="#impl-Distribution%3CNonZeroU32%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU32.html" title="struct core::num::nonzero::NonZeroU32">NonZeroU32</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#107">source</a><a href="#method.sample-16" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU32.html" title="struct core::num::nonzero::NonZeroU32">NonZeroU32</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-16" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-16" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CNonZeroU64%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#108">source</a><a href="#impl-Distribution%3CNonZeroU64%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU64.html" title="struct core::num::nonzero::NonZeroU64">NonZeroU64</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-17" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#108">source</a><a href="#method.sample-17" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU64.html" title="struct core::num::nonzero::NonZeroU64">NonZeroU64</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-17" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-17" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-17" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-17" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CNonZeroU8%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#105">source</a><a href="#impl-Distribution%3CNonZeroU8%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU8.html" title="struct core::num::nonzero::NonZeroU8">NonZeroU8</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-14" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#105">source</a><a href="#method.sample-14" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU8.html" title="struct core::num::nonzero::NonZeroU8">NonZeroU8</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-14" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-14" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-14" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-14" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CNonZeroUsize%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#110">source</a><a href="#impl-Distribution%3CNonZeroUsize%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroUsize.html" title="struct core::num::nonzero::NonZeroUsize">NonZeroUsize</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-19" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#110">source</a><a href="#method.sample-19" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroUsize.html" title="struct core::num::nonzero::NonZeroUsize">NonZeroUsize</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-19" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-19" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-19" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-19" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3COption%3CT%3E%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#233-245">source</a><a href="#impl-Distribution%3COption%3CT%3E%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-68" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#237-244">source</a><a href="#method.sample-68" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-68" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-68" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-68" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-68" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CWrapping%3CT%3E%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#247-254">source</a><a href="#impl-Distribution%3CWrapping%3CT%3E%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/wrapping/struct.Wrapping.html" title="struct core::num::wrapping::Wrapping">Wrapping</a><T>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-69" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#251-253">source</a><a href="#method.sample-69" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/wrapping/struct.Wrapping.html" title="struct core::num::wrapping::Wrapping">Wrapping</a><T></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-69" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-69" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-69" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-69" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cbool%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#137-146">source</a><a href="#impl-Distribution%3Cbool%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-21" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#139-145">source</a><a href="#method.sample-21" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-21" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-21" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-21" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-21" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cchar%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#74-93">source</a><a href="#impl-Distribution%3Cchar%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.char.html">char</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-20" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#76-92">source</a><a href="#method.sample-20" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.char.html">char</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-20" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-20" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-20" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-20" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cf32%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#impl-Distribution%3Cf32%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cf64%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#impl-Distribution%3Cf64%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#method.sample-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Ci128%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#88">source</a><a href="#impl-Distribution%3Ci128%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#88">source</a><a href="#method.sample-12" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-12" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-12" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Ci16%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#85">source</a><a href="#impl-Distribution%3Ci16%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#85">source</a><a href="#method.sample-9" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-9" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-9" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Ci32%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#86">source</a><a href="#impl-Distribution%3Ci32%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#86">source</a><a href="#method.sample-10" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-10" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-10" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Ci64%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#87">source</a><a href="#impl-Distribution%3Ci64%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#87">source</a><a href="#method.sample-11" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-11" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-11" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Ci8%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#84">source</a><a href="#impl-Distribution%3Ci8%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#84">source</a><a href="#method.sample-8" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-8" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-8" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cisize%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#89">source</a><a href="#impl-Distribution%3Cisize%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#89">source</a><a href="#method.sample-13" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-13" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-13" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cu128%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#49-57">source</a><a href="#impl-Distribution%3Cu128%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#51-56">source</a><a href="#method.sample-6" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-6" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-6" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cu16%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#28-33">source</a><a href="#impl-Distribution%3Cu16%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#30-32">source</a><a href="#method.sample-3" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-3" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-3" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cu32%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#35-40">source</a><a href="#impl-Distribution%3Cu32%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#37-39">source</a><a href="#method.sample-4" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-4" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-4" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cu64%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#42-47">source</a><a href="#impl-Distribution%3Cu64%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#44-46">source</a><a href="#method.sample-5" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-5" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-5" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cu8%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#21-26">source</a><a href="#impl-Distribution%3Cu8%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#23-25">source</a><a href="#method.sample-2" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-2" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-2" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cusize%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#59-71">source</a><a href="#impl-Distribution%3Cusize%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#68-70">source</a><a href="#method.sample-7" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter-7" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map-7" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><section id="impl-Copy-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/mod.rs.html#216">source</a><a href="#impl-Copy-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Standard" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Send-for-Standard" class="impl has-srclink"><a href="#impl-Send-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Sync-for-Standard" class="impl has-srclink"><a href="#impl-Sync-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Unpin-for-Standard" class="impl has-srclink"><a href="#impl-Unpin-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-UnwindSafe-for-Standard" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Uniform.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Uniform.html new file mode 100644 index 0000000..30c5b1c --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.Uniform.html @@ -0,0 +1,48 @@ +<!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="Sample values uniformly between two bounds."><meta name="keywords" content="rust, rustlang, rust-lang, Uniform"><title>Uniform in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Uniform</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.new">new</a></li><li><a href="#method.new_inclusive">new_inclusive</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Uniform%3CX%3E">Clone</a></li><li><a href="#impl-Copy-for-Uniform%3CX%3E">Copy</a></li><li><a href="#impl-Debug-for-Uniform%3CX%3E">Debug</a></li><li><a href="#impl-Distribution%3CX%3E-for-Uniform%3CX%3E">Distribution<X></a></li><li><a href="#impl-From%3CRange%3CX%3E%3E-for-Uniform%3CX%3E">From<Range<X>></a></li><li><a href="#impl-From%3CRangeInclusive%3CX%3E%3E-for-Uniform%3CX%3E">From<RangeInclusive<X>></a></li><li><a href="#impl-PartialEq%3CUniform%3CX%3E%3E-for-Uniform%3CX%3E">PartialEq<Uniform<X>></a></li><li><a href="#impl-StructuralPartialEq-for-Uniform%3CX%3E">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Uniform%3CX%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Uniform%3CX%3E">Send</a></li><li><a href="#impl-Sync-for-Uniform%3CX%3E">Sync</a></li><li><a href="#impl-Unpin-for-Uniform%3CX%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Uniform%3CX%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Uniform%3CX%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Uniform%3CX%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Uniform%3CX%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Uniform%3CX%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Uniform%3CX%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-Uniform%3CX%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Uniform%3CX%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Uniform%3CX%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-Uniform%3CX%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">Uniform</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/uniform.rs.html#179">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Uniform<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>(_);</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Sample values uniformly between two bounds.</p> +<p><a href="struct.Uniform.html#method.new" title="Uniform::new"><code>Uniform::new</code></a> and <a href="struct.Uniform.html#method.new_inclusive" title="Uniform::new_inclusive"><code>Uniform::new_inclusive</code></a> construct a uniform +distribution sampling from the given range; these functions may do extra +work up front to make sampling of multiple values faster. If only one sample +from the range is required, <a href="../trait.Rng.html#method.gen_range"><code>Rng::gen_range</code></a> can be more efficient.</p> +<p>When sampling from a constant range, many calculations can happen at +compile-time and all methods should be fast; for floating-point ranges and +the full range of integer types this should have comparable performance to +the <code>Standard</code> distribution.</p> +<p>Steps are taken to avoid bias which might be present in naive +implementations; for example <code>rng.gen::<u8>() % 170</code> samples from the range +<code>[0, 169]</code> but is twice as likely to select numbers less than 85 than other +values. Further, the implementations here give more weight to the high-bits +generated by the RNG than the low bits, since with some RNGs the low-bits +are of lower quality than the high bits.</p> +<p>Implementations must sample in <code>[low, high)</code> range for +<code>Uniform::new(low, high)</code>, i.e., excluding <code>high</code>. In particular, care must +be taken to ensure that rounding never results values <code>< low</code> or <code>>= high</code>.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::distributions::{Distribution, Uniform}; + +<span class="kw">let </span>between = Uniform::from(<span class="number">10</span>..<span class="number">10000</span>); +<span class="kw">let </span><span class="kw-2">mut </span>rng = rand::thread_rng(); +<span class="kw">let </span><span class="kw-2">mut </span>sum = <span class="number">0</span>; +<span class="kw">for _ in </span><span class="number">0</span>..<span class="number">1000 </span>{ + sum += between.sample(<span class="kw-2">&mut </span>rng); +} +<span class="macro">println!</span>(<span class="string">"{}"</span>, sum);</code></pre></div> +<p>For a single sample, <a href="../trait.Rng.html#method.gen_range"><code>Rng::gen_range</code></a> may be preferred:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::Rng; + +<span class="kw">let </span><span class="kw-2">mut </span>rng = rand::thread_rng(); +<span class="macro">println!</span>(<span class="string">"{}"</span>, rng.gen_range(<span class="number">0</span>..<span class="number">10</span>));</code></pre></div> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#181-201">source</a><a href="#impl-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#184-190">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a><B1, B2>(low: B1, high: B2) -> <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> B1: <a class="trait" href="uniform/trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="uniform/trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Create a new <code>Uniform</code> instance which samples uniformly from the half +open range <code>[low, high)</code> (excluding <code>high</code>). Panics if <code>low >= high</code>.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#194-200">source</a><h4 class="code-header">pub fn <a href="#method.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low: B1, high: B2) -> <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> B1: <a class="trait" href="uniform/trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="uniform/trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Create a new <code>Uniform</code> instance which samples uniformly from the closed +range <code>[low, high]</code> (inclusive). Panics if <code>low > high</code>.</p> +</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-Clone-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-Debug-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CX%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#203-207">source</a><a href="#impl-Distribution%3CX%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><X> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#204-206">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> X</h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CRange%3CX%3E%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#304-308">source</a><a href="#impl-From%3CRange%3CX%3E%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><X>> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#305-307">source</a><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(r: <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><X>) -> <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CRangeInclusive%3CX%3E%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#310-314">source</a><a href="#impl-From%3CRangeInclusive%3CX%3E%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><X>> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#311-313">source</a><a href="#method.from-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(r: <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><X>) -> <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CUniform%3CX%3E%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-PartialEq%3CUniform%3CX%3E%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> + <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X>> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><section id="impl-Copy-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-Copy-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h3></section><section id="impl-StructuralPartialEq-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-StructuralPartialEq-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-Send-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-Sync-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.WeightedIndex.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.WeightedIndex.html new file mode 100644 index 0000000..8e9e8e1 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/struct.WeightedIndex.html @@ -0,0 +1,63 @@ +<!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="A distribution using weighted sampling of discrete items"><meta name="keywords" content="rust, rustlang, rust-lang, WeightedIndex"><title>WeightedIndex in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">WeightedIndex</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.new">new</a></li><li><a href="#method.update_weights">update_weights</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-WeightedIndex%3CX%3E">Clone</a></li><li><a href="#impl-Debug-for-WeightedIndex%3CX%3E">Debug</a></li><li><a href="#impl-Distribution%3Cusize%3E-for-WeightedIndex%3CX%3E">Distribution<usize></a></li><li><a href="#impl-PartialEq%3CWeightedIndex%3CX%3E%3E-for-WeightedIndex%3CX%3E">PartialEq<WeightedIndex<X>></a></li><li><a href="#impl-StructuralPartialEq-for-WeightedIndex%3CX%3E">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-WeightedIndex%3CX%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-WeightedIndex%3CX%3E">Send</a></li><li><a href="#impl-Sync-for-WeightedIndex%3CX%3E">Sync</a></li><li><a href="#impl-Unpin-for-WeightedIndex%3CX%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-WeightedIndex%3CX%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-WeightedIndex%3CX%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-WeightedIndex%3CX%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-WeightedIndex%3CX%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-WeightedIndex%3CX%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-WeightedIndex%3CX%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-WeightedIndex%3CX%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-WeightedIndex%3CX%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-WeightedIndex%3CX%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-WeightedIndex%3CX%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="struct" href="#">WeightedIndex</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/weighted_index.rs.html#81-85">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct WeightedIndex<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A distribution using weighted sampling of discrete items</p> +<p>Sampling a <code>WeightedIndex</code> distribution returns the index of a randomly +selected element from the iterator used when the <code>WeightedIndex</code> was +created. The chance of a given element being picked is proportional to the +value of the element. The weights can use any type <code>X</code> for which an +implementation of <a href="struct.Uniform.html"><code>Uniform<X></code></a> exists.</p> +<h2 id="performance"><a href="#performance">Performance</a></h2> +<p>Time complexity of sampling from <code>WeightedIndex</code> is <code>O(log N)</code> where +<code>N</code> is the number of weights. As an alternative, +<a href="https://docs.rs/rand_distr/*/rand_distr/weighted_alias/index.html"><code>rand_distr::weighted_alias</code></a> +supports <code>O(1)</code> sampling, but with much higher initialisation cost.</p> +<p>A <code>WeightedIndex<X></code> contains a <code>Vec<X></code> and a <a href="struct.Uniform.html"><code>Uniform<X></code></a> and so its +size is the sum of the size of those objects, possibly plus some alignment.</p> +<p>Creating a <code>WeightedIndex<X></code> will allocate enough space to hold <code>N - 1</code> +weights of type <code>X</code>, where <code>N</code> is the number of weights. However, since +<code>Vec</code> doesn’t guarantee a particular growth strategy, additional memory +might be allocated but not used. Since the <code>WeightedIndex</code> object also +contains, this might cause additional allocations, though for primitive +types, <a href="struct.Uniform.html"><code>Uniform<X></code></a> doesn’t allocate any memory.</p> +<p>Sampling from <code>WeightedIndex</code> will result in a single call to +<code>Uniform<X>::sample</code> (method of the <a href="trait.Distribution.html" title="Distribution"><code>Distribution</code></a> trait), which typically +will request a single value from the underlying <a href="../trait.RngCore.html"><code>RngCore</code></a>, though the +exact number depends on the implementation of <code>Uniform<X>::sample</code>.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::prelude::<span class="kw-2">*</span>; +<span class="kw">use </span>rand::distributions::WeightedIndex; + +<span class="kw">let </span>choices = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>weights = [<span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]; +<span class="kw">let </span>dist = WeightedIndex::new(<span class="kw-2">&</span>weights).unwrap(); +<span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng(); +<span class="kw">for _ in </span><span class="number">0</span>..<span class="number">100 </span>{ + <span class="comment">// 50% chance to print 'a', 25% chance to print 'b', 25% chance to print 'c' + </span><span class="macro">println!</span>(<span class="string">"{}"</span>, choices[dist.sample(<span class="kw-2">&mut </span>rng)]); +} + +<span class="kw">let </span>items = [(<span class="string">'a'</span>, <span class="number">0</span>), (<span class="string">'b'</span>, <span class="number">3</span>), (<span class="string">'c'</span>, <span class="number">7</span>)]; +<span class="kw">let </span>dist2 = WeightedIndex::new(items.iter().map(|item| item.<span class="number">1</span>)).unwrap(); +<span class="kw">for _ in </span><span class="number">0</span>..<span class="number">100 </span>{ + <span class="comment">// 0% chance to print 'a', 30% chance to print 'b', 70% chance to print 'c' + </span><span class="macro">println!</span>(<span class="string">"{}"</span>, items[dist2.sample(<span class="kw-2">&mut </span>rng)].<span class="number">0</span>); +}</code></pre></div> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#87-221">source</a><a href="#impl-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#96-131">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a><I>(weights: I) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X>, <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> I::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>: <a class="trait" href="uniform/trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X>,<br> X: for<'a> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.AddAssign.html" title="trait core::ops::arith::AddAssign">AddAssign</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</span></h4></section></summary><div class="docblock"><p>Creates a new a <code>WeightedIndex</code> <a href="trait.Distribution.html" title="Distribution"><code>Distribution</code></a> using the values +in <code>weights</code>. The weights can use any type <code>X</code> for which an +implementation of <a href="struct.Uniform.html"><code>Uniform<X></code></a> exists.</p> +<p>Returns an error if the iterator is empty, if any weight is <code>< 0</code>, or +if its total value is 0.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.update_weights" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#142-220">source</a><h4 class="code-header">pub fn <a href="#method.update_weights" class="fnname">update_weights</a>(<br> &mut self,<br> new_weights: &[(<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>X)]<br>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.unit.html">()</a>, <a class="enum" href="weighted/enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>><span class="where fmt-newline">where<br> X: for<'a> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.AddAssign.html" title="trait core::ops::arith::AddAssign">AddAssign</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>X> + for<'a> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.SubAssign.html" title="trait core::ops::arith::SubAssign">SubAssign</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</span></h4></section></summary><div class="docblock"><p>Update a subset of weights, without changing the number of weights.</p> +<p><code>new_weights</code> must be sorted by the index.</p> +<p>Using this method instead of <code>new</code> might be more efficient if only a small number of +weights is modified. No allocations are performed, unless the weight type <code>X</code> uses +allocation internally.</p> +<p>In case of error, <code>self</code> is not modified.</p> +</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#impl-Clone-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#impl-Debug-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cusize%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#223-240">source</a><a href="#impl-Distribution%3Cusize%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#226-239">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CWeightedIndex%3CX%3E%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#impl-PartialEq%3CWeightedIndex%3CX%3E%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> + <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X>> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><section id="impl-StructuralPartialEq-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#impl-StructuralPartialEq-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-Send-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-Sync-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-Unpin-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,<br> <X as <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.DistString.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.DistString.html new file mode 100644 index 0000000..8b31106 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.DistString.html @@ -0,0 +1,13 @@ +<!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="`String` sampler"><meta name="keywords" content="rust, rustlang, rust-lang, DistString"><title>DistString in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">DistString</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.append_string">append_string</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.sample_string">sample_string</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="trait" href="#">DistString</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/distribution.rs.html#197-208">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait DistString { + fn <a href="#tymethod.append_string" class="fnname">append_string</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(<br> &self,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R,<br> string: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,<br> len: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a><br> ); + + fn <a href="#method.sample_string" class="fnname">sample_string</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R, len: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a> { ... } +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><code>String</code> sampler</p> +<p>Sampling a <code>String</code> of random characters is not quite the same as collecting +a sequence of chars. This trait contains some helpers.</p> +</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.append_string" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#199">source</a><h4 class="code-header">fn <a href="#tymethod.append_string" class="fnname">append_string</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(<br> &self,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R,<br> string: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,<br> len: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a><br>)</h4></section></summary><div class="docblock"><p>Append <code>len</code> random chars to <code>string</code></p> +</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_string" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#203-207">source</a><h4 class="code-header">fn <a href="#method.sample_string" class="fnname">sample_string</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R, len: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Generate a <code>String</code> of <code>len</code> random chars</p> +</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-DistString-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#128-135">source</a><a href="#impl-DistString-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.DistString.html" title="trait rand::distributions::DistString">DistString</a> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section><section id="impl-DistString-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#98-106">source</a><a href="#impl-DistString-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.DistString.html" title="trait rand::distributions::DistString">DistString</a> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><div class="docblock"><p>Note: the <code>String</code> is potentially left with excess capacity; optionally the +user may call <code>string.shrink_to_fit()</code> afterwards.</p> +</div></div><script src="../../implementors/rand/distributions/distribution/trait.DistString.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.Distribution.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.Distribution.html new file mode 100644 index 0000000..32c5f9d --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.Distribution.html @@ -0,0 +1,65 @@ +<!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="Types (distributions) that can be used to create a random instance of `T`."><meta name="keywords" content="rust, rustlang, rust-lang, Distribution"><title>Distribution in rand::distributions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Distribution</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.sample">sample</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.map">map</a></li><li><a href="#method.sample_iter">sample_iter</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Distribution%3CT%3E-for-%26%27a%20D">&'a D</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rand::distributions</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../index.html">rand</a>::<wbr><a href="index.html">distributions</a>::<wbr><a class="trait" href="#">Distribution</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/rand/distributions/distribution.rs.html#35-113">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait Distribution<T> { + fn <a href="#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> T; + + fn <a href="#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><br> <span class="where">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, + { ... } +<span class="item-spacer"></span> fn <a href="#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><br> <span class="where">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, + { ... } +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Types (distributions) that can be used to create a random instance of <code>T</code>.</p> +<p>It is possible to sample from a distribution through both the +<code>Distribution</code> and <a href="../trait.Rng.html" title="Rng"><code>Rng</code></a> traits, via <code>distr.sample(&mut rng)</code> and +<code>rng.sample(distr)</code>. They also both offer the <a href="trait.Distribution.html#method.sample_iter"><code>sample_iter</code></a> method, which +produces an iterator that samples from the distribution.</p> +<p>All implementations are expected to be immutable; this has the significant +advantage of not needing to consider thread safety, and for most +distributions efficient state-less sampling algorithms are available.</p> +<p>Implementations are typically expected to be portable with reproducible +results when used with a PRNG with fixed seed; see the +<a href="https://rust-random.github.io/book/portability.html">portability chapter</a> +of The Rust Rand Book. In some cases this does not apply, e.g. the <code>usize</code> +type requires different sampling on 32-bit and 64-bit machines.</p> +</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.sample" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#37">source</a><h4 class="code-header">fn <a href="#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> T</h4></section></summary><div class="docblock"><p>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</p> +</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#73-83">source</a><h4 class="code-header">fn <a href="#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness.</p> +<p>Note that this function takes <code>self</code> by value. This works since +<code>Distribution<T></code> is impl’d for <code>&D</code> where <code>D: Distribution<T></code>, +however borrowing is not automatic hence <code>distr.sample_iter(...)</code> may +need to be replaced with <code>(&distr).sample_iter(...)</code> to borrow or +<code>(&*distr).sample_iter(...)</code> to reborrow an existing reference.</p> +<h5 id="example"><a href="#example">Example</a></h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::thread_rng; +<span class="kw">use </span>rand::distributions::{Distribution, Alphanumeric, Uniform, Standard}; + +<span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng(); + +<span class="comment">// Vec of 16 x f32: +</span><span class="kw">let </span>v: Vec<f32> = Standard.sample_iter(<span class="kw-2">&mut </span>rng).take(<span class="number">16</span>).collect(); + +<span class="comment">// String: +</span><span class="kw">let </span>s: String = Alphanumeric + .sample_iter(<span class="kw-2">&mut </span>rng) + .take(<span class="number">7</span>) + .map(char::from) + .collect(); + +<span class="comment">// Dice-rolling: +</span><span class="kw">let </span>die_range = Uniform::new_inclusive(<span class="number">1</span>, <span class="number">6</span>); +<span class="kw">let </span><span class="kw-2">mut </span>roll_die = die_range.sample_iter(<span class="kw-2">&mut </span>rng); +<span class="kw">while </span>roll_die.next().unwrap() != <span class="number">6 </span>{ + <span class="macro">println!</span>(<span class="string">"Not a 6; rolling again!"</span>); +}</code></pre></div> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#102-112">source</a><h4 class="code-header">fn <a href="#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code></p> +<h5 id="example-1"><a href="#example-1">Example</a></h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::thread_rng; +<span class="kw">use </span>rand::distributions::{Distribution, Uniform}; + +<span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng(); + +<span class="kw">let </span>die = Uniform::new_inclusive(<span class="number">1</span>, <span class="number">6</span>); +<span class="kw">let </span>even_number = die.map(|num| num % <span class="number">2 </span>== <span class="number">0</span>); +<span class="kw">while </span>!even_number.sample(<span class="kw-2">&mut </span>rng) { + <span class="macro">println!</span>(<span class="string">"Still odd; rolling again!"</span>); +}</code></pre></div> +</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Distribution%3CT%3E-for-%26%27a%20D" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#115-119">source</a><a href="#impl-Distribution%3CT%3E-for-%26%27a%20D" class="anchor"></a><h3 class="code-header">impl<'a, T, D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>D</h3></section></summary><div class="impl-items"><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#116-118">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> T</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-Distribution%3Cbool%3E-for-Bernoulli" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/bernoulli.rs.html#131-141">source</a><a href="#impl-Distribution%3Cbool%3E-for-Bernoulli" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>> for <a class="struct" href="struct.Bernoulli.html" title="struct rand::distributions::Bernoulli">Bernoulli</a></h3></section><section id="impl-Distribution%3Cbool%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#137-146">source</a><a href="#impl-Distribution%3Cbool%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cchar%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#74-93">source</a><a href="#impl-Distribution%3Cchar%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.char.html">char</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cf32%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#impl-Distribution%3Cf32%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section><section id="impl-Distribution%3Cf32%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#impl-Distribution%3Cf32%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section><section id="impl-Distribution%3Cf32%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#153">source</a><a href="#impl-Distribution%3Cf32%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cf64%3E-for-Open01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#impl-Distribution%3Cf64%3E-for-Open01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>> for <a class="struct" href="struct.Open01.html" title="struct rand::distributions::Open01">Open01</a></h3></section><section id="impl-Distribution%3Cf64%3E-for-OpenClosed01" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#impl-Distribution%3Cf64%3E-for-OpenClosed01" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>> for <a class="struct" href="struct.OpenClosed01.html" title="struct rand::distributions::OpenClosed01">OpenClosed01</a></h3></section><section id="impl-Distribution%3Cf64%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/float.rs.html#154">source</a><a href="#impl-Distribution%3Cf64%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Ci8%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#84">source</a><a href="#impl-Distribution%3Ci8%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Ci16%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#85">source</a><a href="#impl-Distribution%3Ci16%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Ci32%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#86">source</a><a href="#impl-Distribution%3Ci32%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Ci64%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#87">source</a><a href="#impl-Distribution%3Ci64%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Ci128%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#88">source</a><a href="#impl-Distribution%3Ci128%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cisize%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#89">source</a><a href="#impl-Distribution%3Cisize%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cu8%3E-for-Alphanumeric" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#108-125">source</a><a href="#impl-Distribution%3Cu8%3E-for-Alphanumeric" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>> for <a class="struct" href="struct.Alphanumeric.html" title="struct rand::distributions::Alphanumeric">Alphanumeric</a></h3></section><section id="impl-Distribution%3Cu8%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#21-26">source</a><a href="#impl-Distribution%3Cu8%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cu16%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#28-33">source</a><a href="#impl-Distribution%3Cu16%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cu32%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#35-40">source</a><a href="#impl-Distribution%3Cu32%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cu64%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#42-47">source</a><a href="#impl-Distribution%3Cu64%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cu128%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#49-57">source</a><a href="#impl-Distribution%3Cu128%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3C()%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#172-178">source</a><a href="#impl-Distribution%3C()%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.unit.html">()</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3Cusize%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#59-71">source</a><a href="#impl-Distribution%3Cusize%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3CNonZeroU8%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#105">source</a><a href="#impl-Distribution%3CNonZeroU8%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU8.html" title="struct core::num::nonzero::NonZeroU8">NonZeroU8</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3CNonZeroU16%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#106">source</a><a href="#impl-Distribution%3CNonZeroU16%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU16.html" title="struct core::num::nonzero::NonZeroU16">NonZeroU16</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3CNonZeroU32%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#107">source</a><a href="#impl-Distribution%3CNonZeroU32%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU32.html" title="struct core::num::nonzero::NonZeroU32">NonZeroU32</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3CNonZeroU64%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#108">source</a><a href="#impl-Distribution%3CNonZeroU64%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU64.html" title="struct core::num::nonzero::NonZeroU64">NonZeroU64</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3CNonZeroU128%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#109">source</a><a href="#impl-Distribution%3CNonZeroU128%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroU128.html" title="struct core::num::nonzero::NonZeroU128">NonZeroU128</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3CNonZeroUsize%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/integer.rs.html#110">source</a><a href="#impl-Distribution%3CNonZeroUsize%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/nonzero/struct.NonZeroUsize.html" title="struct core::num::nonzero::NonZeroUsize">NonZeroUsize</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3C%26%27a%20T%3E-for-Slice%3C%27a%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/slice.rs.html#84-100">source</a><a href="#impl-Distribution%3C%26%27a%20T%3E-for-Slice%3C%27a%2C%20T%3E" class="anchor"></a><h3 class="code-header">impl<'a, T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>T> for <a class="struct" href="struct.Slice.html" title="struct rand::distributions::Slice">Slice</a><'a, T></h3></section><section id="impl-Distribution%3C(A%2C)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#179">source</a><a href="#impl-Distribution%3C(A%2C)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A,)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#180">source</a><a href="#impl-Distribution%3C(A%2C%20B)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#181">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#182">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#183">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#184">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#185">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#186">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#187">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><I>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#188">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><I>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><J>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#189">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><I>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><J>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><K>,</span></h3></section><section id="impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K%2C%20L)%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#190">source</a><a href="#impl-Distribution%3C(A%2C%20B%2C%20C%2C%20D%2C%20E%2C%20F%2C%20G%2C%20H%2C%20I%2C%20J%2C%20K%2C%20L)%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K, L> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L)</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><A>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><B>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><C>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><D>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><E>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><F>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><G>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><H>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><I>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><J>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><K>,<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><L>,</span></h3></section><section id="impl-Distribution%3CS%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/distribution.rs.html#182-190">source</a><a href="#impl-Distribution%3CS%3E-for-DistMap%3CD%2C%20F%2C%20T%2C%20S%3E" class="anchor"></a><h3 class="code-header">impl<D, F, T, S> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><S> for <a class="struct" href="struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><D, F, T, S><span class="where fmt-newline">where<br> D: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,</span></h3></section><section id="impl-Distribution%3COption%3CT%3E%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#233-245">source</a><a href="#impl-Distribution%3COption%3CT%3E%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%200%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%200%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 0]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a></h3></section><section id="impl-Distribution%3C%5BT%3B%201%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%201%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 1]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%202%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%202%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 2]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%203%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%203%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 3]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%204%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%204%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 4]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%205%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%205%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 5]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%206%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%206%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 6]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%207%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%207%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 7]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%208%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%208%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 8]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%209%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%209%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 9]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2010%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2010%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 10]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2011%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2011%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 11]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2012%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2012%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 12]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2013%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2013%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 13]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2014%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2014%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 14]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2015%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2015%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 15]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2016%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2016%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 16]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2017%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2017%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 17]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2018%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2018%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 18]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2019%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2019%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 19]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2020%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2020%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 20]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2021%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2021%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 21]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2022%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2022%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 22]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2023%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2023%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 23]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2024%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2024%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 24]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2025%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2025%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 25]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2026%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2026%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 26]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2027%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2027%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 27]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2028%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2028%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 28]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2029%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2029%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 29]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2030%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2030%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 30]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2031%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2031%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 31]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3C%5BT%3B%2032%5D%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#231">source</a><a href="#impl-Distribution%3C%5BT%3B%2032%5D%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.array.html">[T; 32]</a>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3CWrapping%3CT%3E%3E-for-Standard" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/other.rs.html#247-254">source</a><a href="#impl-Distribution%3CWrapping%3CT%3E%3E-for-Standard" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/num/wrapping/struct.Wrapping.html" title="struct core::num::wrapping::Wrapping">Wrapping</a><T>> for <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a><span class="where fmt-newline">where<br> <a class="struct" href="struct.Standard.html" title="struct rand::distributions::Standard">Standard</a>: <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,</span></h3></section><section id="impl-Distribution%3Cusize%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/weighted_index.rs.html#223-240">source</a><a href="#impl-Distribution%3Cusize%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="weighted/struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</span></h3></section><section id="impl-Distribution%3CX%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../src/rand/distributions/uniform.rs.html#203-207">source</a><a href="#impl-Distribution%3CX%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><X> for <a class="struct" href="struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></div><script src="../../implementors/rand/distributions/distribution/trait.Distribution.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/index.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/index.html new file mode 100644 index 0000000..f89bdf1 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/index.html @@ -0,0 +1,83 @@ +<!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="A distribution uniformly sampling numbers within a given range."><meta name="keywords" content="rust, rustlang, rust-lang, uniform"><title>rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod"><!--[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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Module uniform</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a class="mod" href="#">uniform</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#10-1658">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A distribution uniformly sampling numbers within a given range.</p> +<p><a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a> is the standard distribution to sample uniformly from a range; +e.g. <code>Uniform::new_inclusive(1, 6)</code> can sample integers from 1 to 6, like a +standard die. <a href="../../trait.Rng.html#method.gen_range" title="Rng::gen_range"><code>Rng::gen_range</code></a> supports any type supported by +<a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a>.</p> +<p>This distribution is provided with support for several primitive types +(all integer and floating-point types) as well as <a href="https://doc.rust-lang.org/1.66.0/core/time/struct.Duration.html" title="std::time::Duration"><code>std::time::Duration</code></a>, +and supports extension to user-defined types via a type-specific <em>back-end</em> +implementation.</p> +<p>The types <a href="struct.UniformInt.html"><code>UniformInt</code></a>, <a href="struct.UniformFloat.html"><code>UniformFloat</code></a> and <a href="struct.UniformDuration.html"><code>UniformDuration</code></a> are the +back-ends supporting sampling from primitive integer and floating-point +ranges as well as from <a href="https://doc.rust-lang.org/1.66.0/core/time/struct.Duration.html" title="std::time::Duration"><code>std::time::Duration</code></a>; these types do not normally +need to be used directly (unless implementing a derived back-end).</p> +<h2 id="example-usage"><a href="#example-usage">Example usage</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::{Rng, thread_rng}; +<span class="kw">use </span>rand::distributions::Uniform; + +<span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng(); +<span class="kw">let </span>side = Uniform::new(-<span class="number">10.0</span>, <span class="number">10.0</span>); + +<span class="comment">// sample between 1 and 10 points +</span><span class="kw">for _ in </span><span class="number">0</span>..rng.gen_range(<span class="number">1</span>..=<span class="number">10</span>) { + <span class="comment">// sample a point from the square with sides -10 - 10 in two dimensions + </span><span class="kw">let </span>(x, y) = (rng.sample(side), rng.sample(side)); + <span class="macro">println!</span>(<span class="string">"Point: {}, {}"</span>, x, y); +}</code></pre></div> +<h2 id="extending-uniform-to-support-a-custom-type"><a href="#extending-uniform-to-support-a-custom-type">Extending <code>Uniform</code> to support a custom type</a></h2> +<p>To extend <a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a> to support your own types, write a back-end which +implements the <a href="trait.UniformSampler.html"><code>UniformSampler</code></a> trait, then implement the <a href="trait.SampleUniform.html"><code>SampleUniform</code></a> +helper trait to “register” your back-end. See the <code>MyF32</code> example below.</p> +<p>At a minimum, the back-end needs to store any parameters needed for sampling +(e.g. the target range) and implement <code>new</code>, <code>new_inclusive</code> and <code>sample</code>. +Those methods should include an assert to check the range is valid (i.e. +<code>low < high</code>). The example below merely wraps another back-end.</p> +<p>The <code>new</code>, <code>new_inclusive</code> and <code>sample_single</code> functions use arguments of +type SampleBorrow<X> in order to support passing in values by reference or +by value. In the implementation of these functions, you can choose to +simply use the reference returned by <a href="trait.SampleBorrow.html#tymethod.borrow"><code>SampleBorrow::borrow</code></a>, or you can choose +to copy or clone the value, whatever is appropriate for your type.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::prelude::<span class="kw-2">*</span>; +<span class="kw">use </span>rand::distributions::uniform::{Uniform, SampleUniform, + UniformSampler, UniformFloat, SampleBorrow}; + +<span class="kw">struct </span>MyF32(f32); + +<span class="attribute">#[derive(Clone, Copy, Debug)] +</span><span class="kw">struct </span>UniformMyF32(UniformFloat<f32>); + +<span class="kw">impl </span>UniformSampler <span class="kw">for </span>UniformMyF32 { + <span class="kw">type </span>X = MyF32; + <span class="kw">fn </span>new<B1, B2>(low: B1, high: B2) -> <span class="self">Self + </span><span class="kw">where </span>B1: SampleBorrow<<span class="self">Self</span>::X> + Sized, + B2: SampleBorrow<<span class="self">Self</span>::X> + Sized + { + UniformMyF32(UniformFloat::<f32>::new(low.borrow().<span class="number">0</span>, high.borrow().<span class="number">0</span>)) + } + <span class="kw">fn </span>new_inclusive<B1, B2>(low: B1, high: B2) -> <span class="self">Self + </span><span class="kw">where </span>B1: SampleBorrow<<span class="self">Self</span>::X> + Sized, + B2: SampleBorrow<<span class="self">Self</span>::X> + Sized + { + UniformMyF32(UniformFloat::<f32>::new_inclusive( + low.borrow().<span class="number">0</span>, + high.borrow().<span class="number">0</span>, + )) + } + <span class="kw">fn </span>sample<R: Rng + <span class="question-mark">?</span>Sized>(<span class="kw-2">&</span><span class="self">self</span>, rng: <span class="kw-2">&mut </span>R) -> <span class="self">Self</span>::X { + MyF32(<span class="self">self</span>.<span class="number">0</span>.sample(rng)) + } +} + +<span class="kw">impl </span>SampleUniform <span class="kw">for </span>MyF32 { + <span class="kw">type </span>Sampler = UniformMyF32; +} + +<span class="kw">let </span>(low, high) = (MyF32(<span class="number">17.0f32</span>), MyF32(<span class="number">22.0f32</span>)); +<span class="kw">let </span>uniform = Uniform::new(low, high); +<span class="kw">let </span>x = uniform.sample(<span class="kw-2">&mut </span>thread_rng());</code></pre></div> +</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Uniform.html" title="rand::distributions::uniform::Uniform struct">Uniform</a></div><div class="item-right docblock-short">Sample values uniformly between two bounds.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.UniformChar.html" title="rand::distributions::uniform::UniformChar struct">UniformChar</a></div><div class="item-right docblock-short">The back-end implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for <code>char</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.UniformDuration.html" title="rand::distributions::uniform::UniformDuration struct">UniformDuration</a></div><div class="item-right docblock-short">The back-end implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for <code>Duration</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.UniformFloat.html" title="rand::distributions::uniform::UniformFloat struct">UniformFloat</a></div><div class="item-right docblock-short">The back-end implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for floating-point types.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.UniformInt.html" title="rand::distributions::uniform::UniformInt struct">UniformInt</a></div><div class="item-right docblock-short">The back-end implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for integer types.</div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.SampleBorrow.html" title="rand::distributions::uniform::SampleBorrow trait">SampleBorrow</a></div><div class="item-right docblock-short">Helper trait similar to <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html"><code>Borrow</code></a> but implemented +only for SampleUniform and references to SampleUniform in +order to resolve ambiguity issues.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.SampleRange.html" title="rand::distributions::uniform::SampleRange trait">SampleRange</a></div><div class="item-right docblock-short">Range that supports generating a single sample efficiently.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.SampleUniform.html" title="rand::distributions::uniform::SampleUniform trait">SampleUniform</a></div><div class="item-right docblock-short">Helper trait for creating objects using the correct implementation of +<a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for the sampling type.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.UniformSampler.html" title="rand::distributions::uniform::UniformSampler trait">UniformSampler</a></div><div class="item-right docblock-short">Helper trait handling actual uniform sampling.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/sidebar-items.js b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/sidebar-items.js new file mode 100644 index 0000000..fe9e7eb --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":[["Uniform","Sample values uniformly between two bounds."],["UniformChar","The back-end implementing [`UniformSampler`] for `char`."],["UniformDuration","The back-end implementing [`UniformSampler`] for `Duration`."],["UniformFloat","The back-end implementing [`UniformSampler`] for floating-point types."],["UniformInt","The back-end implementing [`UniformSampler`] for integer types."]],"trait":[["SampleBorrow","Helper trait similar to `Borrow` but implemented only for SampleUniform and references to SampleUniform in order to resolve ambiguity issues."],["SampleRange","Range that supports generating a single sample efficiently."],["SampleUniform","Helper trait for creating objects using the correct implementation of [`UniformSampler`] for the sampling type."],["UniformSampler","Helper trait handling actual uniform sampling."]]};
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.Uniform.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.Uniform.html new file mode 100644 index 0000000..aeb84e8 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.Uniform.html @@ -0,0 +1,48 @@ +<!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="Sample values uniformly between two bounds."><meta name="keywords" content="rust, rustlang, rust-lang, Uniform"><title>Uniform in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Uniform</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.new">new</a></li><li><a href="#method.new_inclusive">new_inclusive</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-Uniform%3CX%3E">Clone</a></li><li><a href="#impl-Copy-for-Uniform%3CX%3E">Copy</a></li><li><a href="#impl-Debug-for-Uniform%3CX%3E">Debug</a></li><li><a href="#impl-Distribution%3CX%3E-for-Uniform%3CX%3E">Distribution<X></a></li><li><a href="#impl-From%3CRange%3CX%3E%3E-for-Uniform%3CX%3E">From<Range<X>></a></li><li><a href="#impl-From%3CRangeInclusive%3CX%3E%3E-for-Uniform%3CX%3E">From<RangeInclusive<X>></a></li><li><a href="#impl-PartialEq%3CUniform%3CX%3E%3E-for-Uniform%3CX%3E">PartialEq<Uniform<X>></a></li><li><a href="#impl-StructuralPartialEq-for-Uniform%3CX%3E">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-Uniform%3CX%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Uniform%3CX%3E">Send</a></li><li><a href="#impl-Sync-for-Uniform%3CX%3E">Sync</a></li><li><a href="#impl-Unpin-for-Uniform%3CX%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Uniform%3CX%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-Uniform%3CX%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-Uniform%3CX%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-Uniform%3CX%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-Uniform%3CX%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-Uniform%3CX%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-Uniform%3CX%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-Uniform%3CX%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-Uniform%3CX%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-Uniform%3CX%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="struct" href="#">Uniform</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#179">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct Uniform<X: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>(_);</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Sample values uniformly between two bounds.</p> +<p><a href="../struct.Uniform.html#method.new" title="Uniform::new"><code>Uniform::new</code></a> and <a href="../struct.Uniform.html#method.new_inclusive" title="Uniform::new_inclusive"><code>Uniform::new_inclusive</code></a> construct a uniform +distribution sampling from the given range; these functions may do extra +work up front to make sampling of multiple values faster. If only one sample +from the range is required, <a href="../../trait.Rng.html#method.gen_range"><code>Rng::gen_range</code></a> can be more efficient.</p> +<p>When sampling from a constant range, many calculations can happen at +compile-time and all methods should be fast; for floating-point ranges and +the full range of integer types this should have comparable performance to +the <code>Standard</code> distribution.</p> +<p>Steps are taken to avoid bias which might be present in naive +implementations; for example <code>rng.gen::<u8>() % 170</code> samples from the range +<code>[0, 169]</code> but is twice as likely to select numbers less than 85 than other +values. Further, the implementations here give more weight to the high-bits +generated by the RNG than the low bits, since with some RNGs the low-bits +are of lower quality than the high bits.</p> +<p>Implementations must sample in <code>[low, high)</code> range for +<code>Uniform::new(low, high)</code>, i.e., excluding <code>high</code>. In particular, care must +be taken to ensure that rounding never results values <code>< low</code> or <code>>= high</code>.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::distributions::{Distribution, Uniform}; + +<span class="kw">let </span>between = Uniform::from(<span class="number">10</span>..<span class="number">10000</span>); +<span class="kw">let </span><span class="kw-2">mut </span>rng = rand::thread_rng(); +<span class="kw">let </span><span class="kw-2">mut </span>sum = <span class="number">0</span>; +<span class="kw">for _ in </span><span class="number">0</span>..<span class="number">1000 </span>{ + sum += between.sample(<span class="kw-2">&mut </span>rng); +} +<span class="macro">println!</span>(<span class="string">"{}"</span>, sum);</code></pre></div> +<p>For a single sample, <a href="../../trait.Rng.html#method.gen_range"><code>Rng::gen_range</code></a> may be preferred:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::Rng; + +<span class="kw">let </span><span class="kw-2">mut </span>rng = rand::thread_rng(); +<span class="macro">println!</span>(<span class="string">"{}"</span>, rng.gen_range(<span class="number">0</span>..<span class="number">10</span>));</code></pre></div> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#181-201">source</a><a href="#impl-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#184-190">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a><B1, B2>(low: B1, high: B2) -> <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Create a new <code>Uniform</code> instance which samples uniformly from the half +open range <code>[low, high)</code> (excluding <code>high</code>). Panics if <code>low >= high</code>.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#194-200">source</a><h4 class="code-header">pub fn <a href="#method.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low: B1, high: B2) -> <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Create a new <code>Uniform</code> instance which samples uniformly from the closed +range <code>[low, high]</code> (inclusive). Panics if <code>low > high</code>.</p> +</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-Clone-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-Debug-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3CX%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#203-207">source</a><a href="#impl-Distribution%3CX%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="../trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><X> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#204-206">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="../trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> X</h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="../trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="../struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="../struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="../trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="../trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="../trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="../struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="../trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CRange%3CX%3E%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#304-308">source</a><a href="#impl-From%3CRange%3CX%3E%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><X>> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#305-307">source</a><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(r: <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><X>) -> <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CRangeInclusive%3CX%3E%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#310-314">source</a><a href="#impl-From%3CRangeInclusive%3CX%3E%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><X>> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#311-313">source</a><a href="#method.from-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(r: <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><X>) -> <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CUniform%3CX%3E%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-PartialEq%3CUniform%3CX%3E%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> + <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X>> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><section id="impl-Copy-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-Copy-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h3></section><section id="impl-StructuralPartialEq-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#175">source</a><a href="#impl-StructuralPartialEq-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-Send-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-Sync-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-Unpin-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-Uniform%3CX%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../struct.Uniform.html" title="struct rand::distributions::Uniform">Uniform</a><X><span class="where fmt-newline">where<br> <X as <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-Uniform%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-Uniform%3CX%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformChar.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformChar.html new file mode 100644 index 0000000..df29473 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformChar.html @@ -0,0 +1,16 @@ +<!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 back-end implementing [`UniformSampler`] for `char`."><meta name="keywords" content="rust, rustlang, rust-lang, UniformChar"><title>UniformChar in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">UniformChar</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-UniformChar">Clone</a></li><li><a href="#impl-Copy-for-UniformChar">Copy</a></li><li><a href="#impl-Debug-for-UniformChar">Debug</a></li><li><a href="#impl-UniformSampler-for-UniformChar">UniformSampler</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-UniformChar">RefUnwindSafe</a></li><li><a href="#impl-Send-for-UniformChar">Send</a></li><li><a href="#impl-Sync-for-UniformChar">Sync</a></li><li><a href="#impl-Unpin-for-UniformChar">Unpin</a></li><li><a href="#impl-UnwindSafe-for-UniformChar">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-UniformChar">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-UniformChar">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-UniformChar">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-UniformChar">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-UniformChar">Into<U></a></li><li><a href="#impl-ToOwned-for-UniformChar">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-UniformChar">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-UniformChar">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-UniformChar">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="struct" href="#">UniformChar</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#732-734">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct UniformChar { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The back-end implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for <code>char</code>.</p> +<p>Unless you are implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for your own type, this type +should not be used directly, use <a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a> instead.</p> +<p>This differs from integer range sampling since the range <code>0xD800..=0xDFFF</code> +are used for surrogate pairs in UCS and UTF-16, and consequently are not +valid Unicode code points. We must therefore avoid sampling values in this +range.</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#730">source</a><a href="#impl-Clone-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#730">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#730">source</a><a href="#impl-Debug-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#730">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#749-788">source</a><a href="#impl-UniformSampler-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.char.html">char</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#754-763">source</a><a href="#method.new" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#767-776">source</a><a href="#method.new_inclusive" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#778-787">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#277-284">source</a><a href="#method.sample_single" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#294-301">source</a><a href="#method.sample_single_inclusive" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><section id="impl-Copy-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#730">source</a><a href="#impl-Copy-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-UniformChar" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section><section id="impl-Send-for-UniformChar" class="impl has-srclink"><a href="#impl-Send-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section><section id="impl-Sync-for-UniformChar" class="impl has-srclink"><a href="#impl-Sync-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section><section id="impl-Unpin-for-UniformChar" class="impl has-srclink"><a href="#impl-Unpin-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section><section id="impl-UnwindSafe-for-UniformChar" class="impl has-srclink"><a href="#impl-UnwindSafe-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-UniformChar" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformDuration.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformDuration.html new file mode 100644 index 0000000..0c844a2 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformDuration.html @@ -0,0 +1,12 @@ +<!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 back-end implementing [`UniformSampler`] for `Duration`."><meta name="keywords" content="rust, rustlang, rust-lang, UniformDuration"><title>UniformDuration in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">UniformDuration</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-UniformDuration">Clone</a></li><li><a href="#impl-Copy-for-UniformDuration">Copy</a></li><li><a href="#impl-Debug-for-UniformDuration">Debug</a></li><li><a href="#impl-UniformSampler-for-UniformDuration">UniformSampler</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-UniformDuration">RefUnwindSafe</a></li><li><a href="#impl-Send-for-UniformDuration">Send</a></li><li><a href="#impl-Sync-for-UniformDuration">Sync</a></li><li><a href="#impl-Unpin-for-UniformDuration">Unpin</a></li><li><a href="#impl-UnwindSafe-for-UniformDuration">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-UniformDuration">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-UniformDuration">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-UniformDuration">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-UniformDuration">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-UniformDuration">Into<U></a></li><li><a href="#impl-ToOwned-for-UniformDuration">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-UniformDuration">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-UniformDuration">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-UniformDuration">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="struct" href="#">UniformDuration</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#1024-1027">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct UniformDuration { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The back-end implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for <code>Duration</code>.</p> +<p>Unless you are implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for your own types, this type +should not be used directly, use <a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a> instead.</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1022">source</a><a href="#impl-Clone-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1022">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1022">source</a><a href="#impl-Debug-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1022">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1050-1148">source</a><a href="#impl-UniformSampler-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1054-1063">source</a><a href="#method.new" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1066-1117">source</a><a href="#method.new_inclusive" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1120-1147">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#277-284">source</a><a href="#method.sample_single" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#294-301">source</a><a href="#method.sample_single_inclusive" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><section id="impl-Copy-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1022">source</a><a href="#impl-Copy-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-UniformDuration" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section><section id="impl-Send-for-UniformDuration" class="impl has-srclink"><a href="#impl-Send-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section><section id="impl-Sync-for-UniformDuration" class="impl has-srclink"><a href="#impl-Sync-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section><section id="impl-Unpin-for-UniformDuration" class="impl has-srclink"><a href="#impl-Unpin-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section><section id="impl-UnwindSafe-for-UniformDuration" class="impl has-srclink"><a href="#impl-UnwindSafe-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformFloat.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformFloat.html new file mode 100644 index 0000000..8cffcd3 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformFloat.html @@ -0,0 +1,25 @@ +<!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 back-end implementing [`UniformSampler`] for floating-point types."><meta name="keywords" content="rust, rustlang, rust-lang, UniformFloat"><title>UniformFloat in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">UniformFloat</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-UniformFloat%3CX%3E">Clone</a></li><li><a href="#impl-Copy-for-UniformFloat%3CX%3E">Copy</a></li><li><a href="#impl-Debug-for-UniformFloat%3CX%3E">Debug</a></li><li><a href="#impl-PartialEq%3CUniformFloat%3CX%3E%3E-for-UniformFloat%3CX%3E">PartialEq<UniformFloat<X>></a></li><li><a href="#impl-StructuralPartialEq-for-UniformFloat%3CX%3E">StructuralPartialEq</a></li><li><a href="#impl-UniformSampler-for-UniformFloat%3Cf32%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformFloat%3Cf64%3E">UniformSampler</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-UniformFloat%3CX%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-UniformFloat%3CX%3E">Send</a></li><li><a href="#impl-Sync-for-UniformFloat%3CX%3E">Sync</a></li><li><a href="#impl-Unpin-for-UniformFloat%3CX%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-UniformFloat%3CX%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-UniformFloat%3CX%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-UniformFloat%3CX%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-UniformFloat%3CX%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-UniformFloat%3CX%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-UniformFloat%3CX%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-UniformFloat%3CX%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-UniformFloat%3CX%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-UniformFloat%3CX%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-UniformFloat%3CX%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="struct" href="#">UniformFloat</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#811-814">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct UniformFloat<X> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The back-end implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for floating-point types.</p> +<p>Unless you are implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for your own type, this type +should not be used directly, use <a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a> instead.</p> +<h2 id="implementation-notes"><a href="#implementation-notes">Implementation notes</a></h2> +<p>Instead of generating a float in the <code>[0, 1)</code> range using <a href="../struct.Standard.html"><code>Standard</code></a>, the +<code>UniformFloat</code> implementation converts the output of an PRNG itself. This +way one or two steps can be optimized out.</p> +<p>The floats are first converted to a value in the <code>[1, 2)</code> interval using a +transmute-based method, and then mapped to the expected range with a +multiply and addition. Values produced this way have what equals 23 bits of +random digits for an <code>f32</code>, and 52 for an <code>f64</code>.</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#809">source</a><a href="#impl-Clone-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#809">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#809">source</a><a href="#impl-Debug-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#809">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CUniformFloat%3CX%3E%3E-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#809">source</a><a href="#impl-PartialEq%3CUniformFloat%3CX%3E%3E-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X>> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#809">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformFloat%3Cf32%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#998">source</a><a href="#impl-UniformSampler-for-UniformFloat%3Cf32%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#998">source</a><a href="#method.new" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#998">source</a><a href="#method.new_inclusive" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#998">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#998">source</a><a href="#method.sample_single" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#294-301">source</a><a href="#method.sample_single_inclusive" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformFloat%3Cf64%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#999">source</a><a href="#impl-UniformSampler-for-UniformFloat%3Cf64%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-1" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#999">source</a><a href="#method.new-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#999">source</a><a href="#method.new_inclusive-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#999">source</a><a href="#method.sample-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#999">source</a><a href="#method.sample_single-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#294-301">source</a><a href="#method.sample_single_inclusive-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><section id="impl-Copy-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#809">source</a><a href="#impl-Copy-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X></h3></section><section id="impl-StructuralPartialEq-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#809">source</a><a href="#impl-StructuralPartialEq-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-UniformFloat%3CX%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-UniformFloat%3CX%3E" class="impl has-srclink"><a href="#impl-Send-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-UniformFloat%3CX%3E" class="impl has-srclink"><a href="#impl-Sync-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-UniformFloat%3CX%3E" class="impl has-srclink"><a href="#impl-Unpin-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-UniformFloat%3CX%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-UniformFloat%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-UniformFloat%3CX%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformInt.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformInt.html new file mode 100644 index 0000000..bebe178 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/struct.UniformInt.html @@ -0,0 +1,70 @@ +<!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 back-end implementing [`UniformSampler`] for integer types."><meta name="keywords" content="rust, rustlang, rust-lang, UniformInt"><title>UniformInt in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">UniformInt</a></h2><div class="sidebar-elems"><section><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-UniformInt%3CX%3E">Clone</a></li><li><a href="#impl-Copy-for-UniformInt%3CX%3E">Copy</a></li><li><a href="#impl-Debug-for-UniformInt%3CX%3E">Debug</a></li><li><a href="#impl-PartialEq%3CUniformInt%3CX%3E%3E-for-UniformInt%3CX%3E">PartialEq<UniformInt<X>></a></li><li><a href="#impl-StructuralPartialEq-for-UniformInt%3CX%3E">StructuralPartialEq</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Ci128%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Ci16%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Ci32%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Ci64%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Ci8%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Cisize%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Cu128%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Cu16%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Cu32%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Cu64%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Cu8%3E">UniformSampler</a></li><li><a href="#impl-UniformSampler-for-UniformInt%3Cusize%3E">UniformSampler</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-UniformInt%3CX%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-UniformInt%3CX%3E">Send</a></li><li><a href="#impl-Sync-for-UniformInt%3CX%3E">Sync</a></li><li><a href="#impl-Unpin-for-UniformInt%3CX%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-UniformInt%3CX%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-UniformInt%3CX%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-UniformInt%3CX%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-UniformInt%3CX%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-UniformInt%3CX%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-UniformInt%3CX%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-UniformInt%3CX%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-UniformInt%3CX%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-UniformInt%3CX%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-UniformInt%3CX%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="struct" href="#">UniformInt</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#423-427">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct UniformInt<X> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The back-end implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for integer types.</p> +<p>Unless you are implementing <a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for your own type, this type +should not be used directly, use <a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a> instead.</p> +<h2 id="implementation-notes"><a href="#implementation-notes">Implementation notes</a></h2> +<p>For simplicity, we use the same generic struct <code>UniformInt<X></code> for all +integer types <code>X</code>. This gives us only one field type, <code>X</code>; to store unsigned +values of this size, we take use the fact that these conversions are no-ops.</p> +<p>For a closed range, the number of possible numbers we should generate is +<code>range = (high - low + 1)</code>. To avoid bias, we must ensure that the size of +our sample space, <code>zone</code>, is a multiple of <code>range</code>; other values must be +rejected (by replacing with a new random sample).</p> +<p>As a special case, we use <code>range = 0</code> to represent the full range of the +result type (i.e. for <code>new_inclusive($ty::MIN, $ty::MAX)</code>).</p> +<p>The optimum <code>zone</code> is the largest product of <code>range</code> which fits in our +(unsigned) target type. We calculate this by calculating how many numbers we +must reject: <code>reject = (MAX + 1) % range = (MAX - range + 1) % range</code>. Any (large) +product of <code>range</code> will suffice, thus in <code>sample_single</code> we multiply by a +power of 2 via bit-shifting (faster but may cause more rejections).</p> +<p>The smallest integer PRNGs generate is <code>u32</code>. For 8- and 16-bit outputs we +use <code>u32</code> for our <code>zone</code> and samples (because it’s not slower and because +it reduces the chance of having to reject a sample). In this case we cannot +store <code>zone</code> in the target type since it is too large, however we know +<code>ints_to_reject < range <= $unsigned::MAX</code>.</p> +<p>An alternative to using a modulus is widening multiply: After a widening +multiply by <code>range</code>, the result is in the high word. Then comparing the low +word against <code>zone</code> makes sure our distribution is uniform.</p> +</div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#421">source</a><a href="#impl-Clone-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#421">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#421">source</a><a href="#impl-Debug-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#421">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CUniformInt%3CX%3E%3E-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#421">source</a><a href="#impl-PartialEq%3CUniformInt%3CX%3E%3E-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X>> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#421">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Ci128%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#563">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci128%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-4" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#563">source</a><a href="#method.new-4" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#563">source</a><a href="#method.new_inclusive-4" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#563">source</a><a href="#method.sample-4" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#563">source</a><a href="#method.sample_single-4" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#563">source</a><a href="#method.sample_single_inclusive-4" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Ci16%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#560">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci16%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-1" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#560">source</a><a href="#method.new-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#560">source</a><a href="#method.new_inclusive-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#560">source</a><a href="#method.sample-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#560">source</a><a href="#method.sample_single-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#560">source</a><a href="#method.sample_single_inclusive-1" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Ci32%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#561">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci32%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-2" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#561">source</a><a href="#method.new-2" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#561">source</a><a href="#method.new_inclusive-2" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#561">source</a><a href="#method.sample-2" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#561">source</a><a href="#method.sample_single-2" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#561">source</a><a href="#method.sample_single_inclusive-2" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Ci64%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#562">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci64%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-3" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#562">source</a><a href="#method.new-3" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#562">source</a><a href="#method.new_inclusive-3" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#562">source</a><a href="#method.sample-3" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#562">source</a><a href="#method.sample_single-3" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#562">source</a><a href="#method.sample_single_inclusive-3" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Ci8%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#559">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#559">source</a><a href="#method.new" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#559">source</a><a href="#method.new_inclusive" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#559">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#559">source</a><a href="#method.sample_single" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#559">source</a><a href="#method.sample_single_inclusive" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Cisize%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#564">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cisize%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-5" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-5" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#564">source</a><a href="#method.new-5" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#564">source</a><a href="#method.new_inclusive-5" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#564">source</a><a href="#method.sample-5" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#564">source</a><a href="#method.sample_single-5" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#564">source</a><a href="#method.sample_single_inclusive-5" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Cu128%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#570">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu128%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-11" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-11" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#570">source</a><a href="#method.new-11" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#570">source</a><a href="#method.new_inclusive-11" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#570">source</a><a href="#method.sample-11" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#570">source</a><a href="#method.sample_single-11" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#570">source</a><a href="#method.sample_single_inclusive-11" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Cu16%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#566">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu16%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-7" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-7" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#566">source</a><a href="#method.new-7" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#566">source</a><a href="#method.new_inclusive-7" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#566">source</a><a href="#method.sample-7" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#566">source</a><a href="#method.sample_single-7" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#566">source</a><a href="#method.sample_single_inclusive-7" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Cu32%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#567">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu32%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-8" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-8" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#567">source</a><a href="#method.new-8" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#567">source</a><a href="#method.new_inclusive-8" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#567">source</a><a href="#method.sample-8" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#567">source</a><a href="#method.sample_single-8" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#567">source</a><a href="#method.sample_single_inclusive-8" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Cu64%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#568">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu64%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-9" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-9" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#568">source</a><a href="#method.new-9" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#568">source</a><a href="#method.new_inclusive-9" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#568">source</a><a href="#method.sample-9" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#568">source</a><a href="#method.sample_single-9" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#568">source</a><a href="#method.sample_single_inclusive-9" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#565">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-6" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-6" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#565">source</a><a href="#method.new-6" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#565">source</a><a href="#method.new_inclusive-6" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#565">source</a><a href="#method.sample-6" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#565">source</a><a href="#method.sample_single-6" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#565">source</a><a href="#method.sample_single_inclusive-6" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UniformSampler-for-UniformInt%3Cusize%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#569">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cusize%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.X-10" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-10" class="anchor"></a><h4 class="code-header">type <a href="trait.UniformSampler.html#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>The type sampled by this implementation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#569">source</a><a href="#method.new-10" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new" class="fnname">new</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>. <a href="trait.UniformSampler.html#tymethod.new">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new_inclusive-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#569">source</a><a href="#method.new_inclusive-10" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low_b: B1, high_b: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Construct self, with inclusive bounds <code>[low, high]</code>. <a href="trait.UniformSampler.html#tymethod.new_inclusive">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#569">source</a><a href="#method.sample-10" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class='docblock'>Sample a value.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#569">source</a><a href="#method.sample_single-10" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>. <a href="trait.UniformSampler.html#method.sample_single">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#569">source</a><a href="#method.sample_single_inclusive-10" class="anchor"></a><h4 class="code-header">fn <a href="trait.UniformSampler.html#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low_b: B1,<br> high_b: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>. <a href="trait.UniformSampler.html#method.sample_single_inclusive">Read more</a></div></details></div></details><section id="impl-Copy-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#421">source</a><a href="#impl-Copy-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X></h3></section><section id="impl-StructuralPartialEq-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#421">source</a><a href="#impl-StructuralPartialEq-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-UniformInt%3CX%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-UniformInt%3CX%3E" class="impl has-srclink"><a href="#impl-Send-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-UniformInt%3CX%3E" class="impl has-srclink"><a href="#impl-Sync-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-UniformInt%3CX%3E" class="impl has-srclink"><a href="#impl-Unpin-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-UniformInt%3CX%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-UniformInt%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-UniformInt%3CX%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleBorrow.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleBorrow.html new file mode 100644 index 0000000..ca043fd --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleBorrow.html @@ -0,0 +1,8 @@ +<!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="Helper trait similar to `Borrow` but implemented only for SampleUniform and references to SampleUniform in order to resolve ambiguity issues."><meta name="keywords" content="rust, rustlang, rust-lang, SampleBorrow"><title>SampleBorrow in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">SampleBorrow</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.borrow">borrow</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-SampleBorrow%3CBorrowed%3E-for-%26%27a%20Borrowed">&'a Borrowed</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="trait" href="#">SampleBorrow</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#322-327">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait SampleBorrow<Borrowed> { + fn <a href="#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Borrowed; +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Helper trait similar to <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html"><code>Borrow</code></a> but implemented +only for SampleUniform and references to SampleUniform in +order to resolve ambiguity issues.</p> +</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.borrow" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#326">source</a><h4 class="code-header">fn <a href="#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Borrowed</h4></section></summary><div class="docblock"><p>Immutably borrows from an owned value. See <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow"><code>Borrow::borrow</code></a></p> +</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleBorrow%3CBorrowed%3E-for-%26%27a%20Borrowed" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#336-343">source</a><a href="#impl-SampleBorrow%3CBorrowed%3E-for-%26%27a%20Borrowed" class="anchor"></a><h3 class="code-header">impl<'a, Borrowed> <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Borrowed> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>Borrowed<span class="where fmt-newline">where<br> Borrowed: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>,</span></h3></section></summary><div class="impl-items"><section id="method.borrow" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#340-342">source</a><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Borrowed</h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-SampleBorrow%3CBorrowed%3E-for-Borrowed" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#328-335">source</a><a href="#impl-SampleBorrow%3CBorrowed%3E-for-Borrowed" class="anchor"></a><h3 class="code-header">impl<Borrowed> <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Borrowed> for Borrowed<span class="where fmt-newline">where<br> Borrowed: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>,</span></h3></section></div><script src="../../../implementors/rand/distributions/uniform/trait.SampleBorrow.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleRange.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleRange.html new file mode 100644 index 0000000..ea9195f --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleRange.html @@ -0,0 +1,10 @@ +<!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="Range that supports generating a single sample efficiently."><meta name="keywords" content="rust, rustlang, rust-lang, SampleRange"><title>SampleRange in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">SampleRange</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.is_empty">is_empty</a></li><li><a href="#tymethod.sample_single">sample_single</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-SampleRange%3CT%3E-for-Range%3CT%3E">Range<T></a></li><li><a href="#impl-SampleRange%3CT%3E-for-RangeInclusive%3CT%3E">RangeInclusive<T></a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="trait" href="#">SampleRange</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#349-355">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait SampleRange<T> { + fn <a href="#tymethod.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.RngCore.html" title="trait rand::RngCore">RngCore</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> T; +<span class="item-spacer"></span> fn <a href="#tymethod.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a>; +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Range that supports generating a single sample efficiently.</p> +<p>Any type implementing this trait can be used to specify the sampled range +for <code>Rng::gen_range</code>.</p> +</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.sample_single" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#351">source</a><h4 class="code-header">fn <a href="#tymethod.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.RngCore.html" title="trait rand::RngCore">RngCore</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> T</h4></section></summary><div class="docblock"><p>Generate a sample from the given range.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.is_empty" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#354">source</a><h4 class="code-header">fn <a href="#tymethod.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Check whether the range is empty.</p> +</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleRange%3CT%3E-for-Range%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#357-367">source</a><a href="#impl-SampleRange%3CT%3E-for-Range%3CT%3E" class="anchor"></a><h3 class="code-header">impl<T: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="trait.SampleRange.html" title="trait rand::distributions::uniform::SampleRange">SampleRange</a><T> for <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><T></h3></section></summary><div class="impl-items"><section id="method.sample_single" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#359-361">source</a><a href="#method.sample_single" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.RngCore.html" title="trait rand::RngCore">RngCore</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> T</h4></section><section id="method.is_empty" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#364-366">source</a><a href="#method.is_empty" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleRange%3CT%3E-for-RangeInclusive%3CT%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#369-379">source</a><a href="#impl-SampleRange%3CT%3E-for-RangeInclusive%3CT%3E" class="anchor"></a><h3 class="code-header">impl<T: <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="trait.SampleRange.html" title="trait rand::distributions::uniform::SampleRange">SampleRange</a><T> for <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><T></h3></section></summary><div class="impl-items"><section id="method.sample_single-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#371-373">source</a><a href="#method.sample_single-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.RngCore.html" title="trait rand::RngCore">RngCore</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> T</h4></section><section id="method.is_empty-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#376-378">source</a><a href="#method.is_empty-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.is_empty" class="fnname">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"></div><script src="../../../implementors/rand/distributions/uniform/trait.SampleRange.js" data-ignore-extern-crates="core" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleUniform.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleUniform.html new file mode 100644 index 0000000..a7eeb8e --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.SampleUniform.html @@ -0,0 +1,9 @@ +<!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="Helper trait for creating objects using the correct implementation of [`UniformSampler`] for the sampling type."><meta name="keywords" content="rust, rustlang, rust-lang, SampleUniform"><title>SampleUniform in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">SampleUniform</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Sampler">Sampler</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-SampleUniform-for-Duration">Duration</a></li><li><a href="#impl-SampleUniform-for-char">char</a></li><li><a href="#impl-SampleUniform-for-f32">f32</a></li><li><a href="#impl-SampleUniform-for-f64">f64</a></li><li><a href="#impl-SampleUniform-for-i128">i128</a></li><li><a href="#impl-SampleUniform-for-i16">i16</a></li><li><a href="#impl-SampleUniform-for-i32">i32</a></li><li><a href="#impl-SampleUniform-for-i64">i64</a></li><li><a href="#impl-SampleUniform-for-i8">i8</a></li><li><a href="#impl-SampleUniform-for-isize">isize</a></li><li><a href="#impl-SampleUniform-for-u128">u128</a></li><li><a href="#impl-SampleUniform-for-u16">u16</a></li><li><a href="#impl-SampleUniform-for-u32">u32</a></li><li><a href="#impl-SampleUniform-for-u64">u64</a></li><li><a href="#impl-SampleUniform-for-u8">u8</a></li><li><a href="#impl-SampleUniform-for-usize">usize</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="trait" href="#">SampleUniform</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#216-219">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait SampleUniform: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> { + type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a>: <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a><X = Self>; +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Helper trait for creating objects using the correct implementation of +<a href="trait.UniformSampler.html" title="UniformSampler"><code>UniformSampler</code></a> for the sampling type.</p> +<p>See the <a href="index.html">module documentation</a> on how to implement <a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a> range +sampling for a custom type.</p> +</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="associatedtype.Sampler" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#218">source</a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a>: <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a><X = Self></h4></section></summary><div class="docblock"><p>The <code>UniformSampler</code> implementation supporting type <code>X</code>.</p> +</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-i8" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#559">source</a><a href="#impl-SampleUniform-for-i8" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-1" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-i16" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#560">source</a><a href="#impl-SampleUniform-for-i16" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-2" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-i32" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#561">source</a><a href="#impl-SampleUniform-for-i32" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-3" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-i64" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#562">source</a><a href="#impl-SampleUniform-for-i64" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-4" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-i128" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#563">source</a><a href="#impl-SampleUniform-for-i128" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-5" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-5" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-isize" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#564">source</a><a href="#impl-SampleUniform-for-isize" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-6" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-6" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-u8" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#565">source</a><a href="#impl-SampleUniform-for-u8" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-7" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-7" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-u16" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#566">source</a><a href="#impl-SampleUniform-for-u16" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-8" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-8" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-u32" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#567">source</a><a href="#impl-SampleUniform-for-u32" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-9" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-9" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-u64" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#568">source</a><a href="#impl-SampleUniform-for-u64" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-10" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-10" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-usize" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#569">source</a><a href="#impl-SampleUniform-for-usize" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-11" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-11" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-u128" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#570">source</a><a href="#impl-SampleUniform-for-u128" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-12" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-12" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-char" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#717-719">source</a><a href="#impl-SampleUniform-for-char" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.char.html">char</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-13" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-13" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-f32" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#998">source</a><a href="#impl-SampleUniform-for-f32" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-14" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-14" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-f64" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#999">source</a><a href="#impl-SampleUniform-for-f64" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-15" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-15" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-SampleUniform-for-Duration" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1046-1048">source</a><a href="#impl-SampleUniform-for-Duration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> for <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Sampler-16" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sampler-16" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.Sampler" class="associatedtype">Sampler</a> = <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h4></section></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"></div><script src="../../../implementors/rand/distributions/uniform/trait.SampleUniform.js" data-ignore-extern-crates="std,core" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.UniformSampler.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.UniformSampler.html new file mode 100644 index 0000000..fc307c4 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/uniform/trait.UniformSampler.html @@ -0,0 +1,50 @@ +<!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="Helper trait handling actual uniform sampling."><meta name="keywords" content="rust, rustlang, rust-lang, UniformSampler"><title>UniformSampler in rand::distributions::uniform - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">UniformSampler</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.X">X</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.new">new</a></li><li><a href="#tymethod.new_inclusive">new_inclusive</a></li><li><a href="#tymethod.sample">sample</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.sample_single">sample_single</a></li><li><a href="#method.sample_single_inclusive">sample_single_inclusive</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rand::distributions::uniform</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="trait" href="#">UniformSampler</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/uniform.rs.html#231-302">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait UniformSampler: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> { + type <a href="#associatedtype.X" class="associatedtype">X</a>; + + fn <a href="#tymethod.new" class="fnname">new</a><B1, B2>(low: B1, high: B2) -> Self<br> <span class="where">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>; +<span class="item-spacer"></span> fn <a href="#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low: B1, high: B2) -> Self<br> <span class="where">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>; +<span class="item-spacer"></span> fn <a href="#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>; + + fn <a href="#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br> ) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><br> <span class="where">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, + { ... } +<span class="item-spacer"></span> fn <a href="#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br> ) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><br> <span class="where">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, + { ... } +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Helper trait handling actual uniform sampling.</p> +<p>See the <a href="index.html">module documentation</a> on how to implement <a href="../struct.Uniform.html" title="Uniform"><code>Uniform</code></a> range +sampling for a custom type.</p> +<p>Implementation of <a href="trait.UniformSampler.html#method.sample_single"><code>sample_single</code></a> is optional, and is only useful when +the implementation can be faster than <code>Self::new(low, high).sample(rng)</code>.</p> +</div></details><h2 id="required-associated-types" class="small-section-header">Required Associated Types<a href="#required-associated-types" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="associatedtype.X" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#233">source</a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a></h4></section></summary><div class="docblock"><p>The type sampled by this implementation.</p> +</div></details></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.new" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#240-243">source</a><h4 class="code-header">fn <a href="#tymethod.new" class="fnname">new</a><B1, B2>(low: B1, high: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Construct self, with inclusive lower bound and exclusive upper bound +<code>[low, high)</code>.</p> +<p>Usually users should not call this directly but instead use +<code>Uniform::new</code>, which asserts that <code>low < high</code> before calling this.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.new_inclusive" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#250-253">source</a><h4 class="code-header">fn <a href="#tymethod.new_inclusive" class="fnname">new_inclusive</a><B1, B2>(low: B1, high: B2) -> Self<span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Construct self, with inclusive bounds <code>[low, high]</code>.</p> +<p>Usually users should not call this directly but instead use +<code>Uniform::new_inclusive</code>, which asserts that <code>low <= high</code> before +calling this.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="tymethod.sample" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#256">source</a><h4 class="code-header">fn <a href="#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a></h4></section></summary><div class="docblock"><p>Sample a value.</p> +</div></details></div><h2 id="provided-methods" class="small-section-header">Provided Methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#277-284">source</a><h4 class="code-header">fn <a href="#method.sample_single" class="fnname">sample_single</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Sample a single value uniformly from a range with inclusive lower bound +and exclusive upper bound <code>[low, high)</code>.</p> +<p>By default this is implemented using +<code>UniformSampler::new(low, high).sample(rng)</code>. However, for some types +more optimal implementations for single usage may be provided via this +method (which is the case for integers and floats). +Results may not be identical.</p> +<p>Note that to use this method in a generic context, the type needs to be +retrieved via <code>SampleUniform::Sampler</code> as follows:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::{thread_rng, distributions::uniform::{SampleUniform, UniformSampler}}; +<span class="kw">fn </span>sample_from_range<T: SampleUniform>(lb: T, ub: T) -> T { + <span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng(); + <T <span class="kw">as </span>SampleUniform>::Sampler::sample_single(lb, ub, <span class="kw-2">&mut </span>rng) +}</code></pre></div> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_single_inclusive" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#294-301">source</a><h4 class="code-header">fn <a href="#method.sample_single_inclusive" class="fnname">sample_single_inclusive</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, B1, B2>(<br> low: B1,<br> high: B2,<br> rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R<br>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a><span class="where fmt-newline">where<br> B1: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B2: <a class="trait" href="trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type rand::distributions::uniform::UniformSampler::X">X</a>> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class="docblock"><p>Sample a single value uniformly from a range with inclusive lower bound +and inclusive upper bound <code>[low, high]</code>.</p> +<p>By default this is implemented using +<code>UniformSampler::new_inclusive(low, high).sample(rng)</code>. However, for +some types more optimal implementations for single usage may be provided +via this method. +Results may not be identical.</p> +</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformChar" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#749-788">source</a><a href="#impl-UniformSampler-for-UniformChar" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformChar.html" title="struct rand::distributions::uniform::UniformChar">UniformChar</a></h3></section></summary><div class="impl-items"><section id="associatedtype.X-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-1" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.char.html">char</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformDuration" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#1050-1148">source</a><a href="#impl-UniformSampler-for-UniformDuration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformDuration.html" title="struct rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section></summary><div class="impl-items"><section id="associatedtype.X-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-2" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformFloat%3Cf32%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#998">source</a><a href="#impl-UniformSampler-for-UniformFloat%3Cf32%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-3" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformFloat%3Cf64%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#999">source</a><a href="#impl-UniformSampler-for-UniformFloat%3Cf64%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformFloat.html" title="struct rand::distributions::uniform::UniformFloat">UniformFloat</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-4" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci8%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#559">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-5" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-5" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci16%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#560">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci16%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-6" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-6" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci32%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#561">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci32%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-7" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-7" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci64%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#562">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci64%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-8" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-8" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci128%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#563">source</a><a href="#impl-UniformSampler-for-UniformInt%3Ci128%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-9" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-9" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cisize%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#564">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cisize%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-10" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-10" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu8%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#565">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu8%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-11" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-11" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu16%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#566">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu16%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-12" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-12" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu32%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#567">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu32%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-13" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-13" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu64%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#568">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu64%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-14" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-14" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu128%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#570">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cu128%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-15" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-15" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a></h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cusize%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/uniform.rs.html#569">source</a><a href="#impl-UniformSampler-for-UniformInt%3Cusize%3E" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.UniformSampler.html" title="trait rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-16" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.X-16" class="anchor"></a><h4 class="code-header">type <a href="#associatedtype.X" class="associatedtype">X</a> = <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a></h4></section></div></details></div><script src="../../../implementors/rand/distributions/uniform/trait.UniformSampler.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/index.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/index.html new file mode 100644 index 0000000..3b0024a --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/index.html @@ -0,0 +1,2 @@ +<!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 `alias_method` mod in crate `rand`."><meta name="keywords" content="rust, rustlang, rust-lang, alias_method"><title>rand::distributions::weighted::alias_method - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../../normalize.css"><link rel="stylesheet" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../../ayu.css" disabled><link rel="stylesheet" href="../../../../dark.css" disabled><link rel="stylesheet" href="../../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../../storage.js"></script><script defer src="../../../../main.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod"><!--[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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Module alias_method</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../../../index.html">rand</a>::<wbr><a href="../../index.html">distributions</a>::<wbr><a href="../index.html">weighted</a>::<wbr><a class="mod" href="#">alias_method</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../../src/rand/distributions/weighted.rs.html#18">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.8.0: moved to rand_distr crate</span></div></span><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WeightedIndex.html" title="rand::distributions::weighted::alias_method::WeightedIndex struct">WeightedIndex</a><span class="stab deprecated" title="">Deprecated</span></div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Weight.html" title="rand::distributions::weighted::alias_method::Weight trait">Weight</a><span class="stab deprecated" title="">Deprecated</span></div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/sidebar-items.js b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/sidebar-items.js new file mode 100644 index 0000000..ebb3179 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":[["WeightedIndex",""]],"trait":[["Weight",""]]};
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/struct.WeightedIndex.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/struct.WeightedIndex.html new file mode 100644 index 0000000..d537635 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/struct.WeightedIndex.html @@ -0,0 +1,6 @@ +<!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 `WeightedIndex` struct in crate `rand`."><meta name="keywords" content="rust, rustlang, rust-lang, WeightedIndex"><title>WeightedIndex in rand::distributions::weighted::alias_method - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../../normalize.css"><link rel="stylesheet" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../../ayu.css" disabled><link rel="stylesheet" href="../../../../dark.css" disabled><link rel="stylesheet" href="../../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../main.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">WeightedIndex</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Debug-for-WeightedIndex%3CW%3E">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-WeightedIndex%3CW%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-WeightedIndex%3CW%3E">Send</a></li><li><a href="#impl-Sync-for-WeightedIndex%3CW%3E">Sync</a></li><li><a href="#impl-Unpin-for-WeightedIndex%3CW%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-WeightedIndex%3CW%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-WeightedIndex%3CW%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-WeightedIndex%3CW%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-WeightedIndex%3CW%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-WeightedIndex%3CW%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-WeightedIndex%3CW%3E">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-WeightedIndex%3CW%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-WeightedIndex%3CW%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-WeightedIndex%3CW%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions::weighted::alias_method</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../../../index.html">rand</a>::<wbr><a href="../../index.html">distributions</a>::<wbr><a href="../index.html">weighted</a>::<wbr><a href="index.html">alias_method</a>::<wbr><a class="struct" href="#">WeightedIndex</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../../src/rand/distributions/weighted.rs.html#26-28">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct WeightedIndex<W: <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a>> { /* private fields */ }</code></pre></div><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.8.0: moved to rand_distr crate</span></div></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#29-33">source</a><a href="#impl-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<W: <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a>> <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::alias_method::WeightedIndex">WeightedIndex</a><W></h3></section></summary><div class="impl-items"><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#30-32">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a>(_weights: <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><W>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="enum" href="../enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.8.0: moved to rand_distr crate</span></div></span></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#25">source</a><a href="#impl-Debug-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<W: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::alias_method::WeightedIndex">WeightedIndex</a><W></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#25">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<W> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::alias_method::WeightedIndex">WeightedIndex</a><W><span class="where fmt-newline">where<br> W: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a href="#impl-Send-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<W> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::alias_method::WeightedIndex">WeightedIndex</a><W><span class="where fmt-newline">where<br> W: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a href="#impl-Sync-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<W> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::alias_method::WeightedIndex">WeightedIndex</a><W><span class="where fmt-newline">where<br> W: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a href="#impl-Unpin-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<W> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::alias_method::WeightedIndex">WeightedIndex</a><W><span class="where fmt-newline">where<br> W: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<W> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::alias_method::WeightedIndex">WeightedIndex</a><W><span class="where fmt-newline">where<br> W: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-WeightedIndex%3CW%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-WeightedIndex%3CW%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/trait.Weight.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/trait.Weight.html new file mode 100644 index 0000000..a528442 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/alias_method/trait.Weight.html @@ -0,0 +1,2 @@ +<!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 `Weight` trait in crate `rand`."><meta name="keywords" content="rust, rustlang, rust-lang, Weight"><title>Weight in rand::distributions::weighted::alias_method - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../../normalize.css"><link rel="stylesheet" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../../ayu.css" disabled><link rel="stylesheet" href="../../../../dark.css" disabled><link rel="stylesheet" href="../../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../main.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Weight</a></h2><div class="sidebar-elems"><section><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Weight-for-f32">f32</a></li><li><a href="#impl-Weight-for-f64">f64</a></li><li><a href="#impl-Weight-for-i128">i128</a></li><li><a href="#impl-Weight-for-i16">i16</a></li><li><a href="#impl-Weight-for-i32">i32</a></li><li><a href="#impl-Weight-for-i64">i64</a></li><li><a href="#impl-Weight-for-i8">i8</a></li><li><a href="#impl-Weight-for-isize">isize</a></li><li><a href="#impl-Weight-for-u128">u128</a></li><li><a href="#impl-Weight-for-u16">u16</a></li><li><a href="#impl-Weight-for-u32">u32</a></li><li><a href="#impl-Weight-for-u64">u64</a></li><li><a href="#impl-Weight-for-u8">u8</a></li><li><a href="#impl-Weight-for-usize">usize</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rand::distributions::weighted::alias_method</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="../../../index.html">rand</a>::<wbr><a href="../../index.html">distributions</a>::<wbr><a href="../index.html">weighted</a>::<wbr><a href="index.html">alias_method</a>::<wbr><a class="trait" href="#">Weight</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../../src/rand/distributions/weighted.rs.html#35">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait Weight { }</code></pre></div><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.8.0: moved to rand_distr crate</span></div></span><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><section id="impl-Weight-for-f64" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#43">source</a><a href="#impl-Weight-for-f64" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f64.html">f64</a></h3></section><section id="impl-Weight-for-f32" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#43">source</a><a href="#impl-Weight-for-f32" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.f32.html">f32</a></h3></section><section id="impl-Weight-for-u8" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#44">source</a><a href="#impl-Weight-for-u8" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u8.html">u8</a></h3></section><section id="impl-Weight-for-u16" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#44">source</a><a href="#impl-Weight-for-u16" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u16.html">u16</a></h3></section><section id="impl-Weight-for-u32" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#44">source</a><a href="#impl-Weight-for-u32" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u32.html">u32</a></h3></section><section id="impl-Weight-for-u64" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#44">source</a><a href="#impl-Weight-for-u64" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u64.html">u64</a></h3></section><section id="impl-Weight-for-usize" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#44">source</a><a href="#impl-Weight-for-usize" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a></h3></section><section id="impl-Weight-for-i8" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#45">source</a><a href="#impl-Weight-for-i8" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i8.html">i8</a></h3></section><section id="impl-Weight-for-i16" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#45">source</a><a href="#impl-Weight-for-i16" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i16.html">i16</a></h3></section><section id="impl-Weight-for-i32" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#45">source</a><a href="#impl-Weight-for-i32" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i32.html">i32</a></h3></section><section id="impl-Weight-for-i64" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#45">source</a><a href="#impl-Weight-for-i64" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i64.html">i64</a></h3></section><section id="impl-Weight-for-isize" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#45">source</a><a href="#impl-Weight-for-isize" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.isize.html">isize</a></h3></section><section id="impl-Weight-for-u128" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#46">source</a><a href="#impl-Weight-for-u128" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.u128.html">u128</a></h3></section><section id="impl-Weight-for-i128" class="impl has-srclink"><a class="srclink rightside" href="../../../../src/rand/distributions/weighted.rs.html#46">source</a><a href="#impl-Weight-for-i128" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.i128.html">i128</a></h3></section><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"></div><script src="../../../../implementors/rand/distributions/weighted/alias_method/trait.Weight.js" data-ignore-extern-crates="std" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/enum.WeightedError.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/enum.WeightedError.html new file mode 100644 index 0000000..ba1bd6d --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/enum.WeightedError.html @@ -0,0 +1,20 @@ +<!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="Error type returned from `WeightedIndex::new`."><meta name="keywords" content="rust, rustlang, rust-lang, WeightedError"><title>WeightedError in rand::distributions::weighted - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc enum"><!--[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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">WeightedError</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block"><li><a href="#variant.AllWeightsZero">AllWeightsZero</a></li><li><a href="#variant.InvalidWeight">InvalidWeight</a></li><li><a href="#variant.NoItem">NoItem</a></li><li><a href="#variant.TooMany">TooMany</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-WeightedError">Clone</a></li><li><a href="#impl-Copy-for-WeightedError">Copy</a></li><li><a href="#impl-Debug-for-WeightedError">Debug</a></li><li><a href="#impl-Display-for-WeightedError">Display</a></li><li><a href="#impl-Eq-for-WeightedError">Eq</a></li><li><a href="#impl-Error-for-WeightedError">Error</a></li><li><a href="#impl-PartialEq%3CWeightedError%3E-for-WeightedError">PartialEq<WeightedError></a></li><li><a href="#impl-StructuralEq-for-WeightedError">StructuralEq</a></li><li><a href="#impl-StructuralPartialEq-for-WeightedError">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-WeightedError">RefUnwindSafe</a></li><li><a href="#impl-Send-for-WeightedError">Send</a></li><li><a href="#impl-Sync-for-WeightedError">Sync</a></li><li><a href="#impl-Unpin-for-WeightedError">Unpin</a></li><li><a href="#impl-UnwindSafe-for-WeightedError">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-WeightedError">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-WeightedError">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-WeightedError">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-WeightedError">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-WeightedError">Into<U></a></li><li><a href="#impl-Provider-for-WeightedError">Provider</a></li><li><a href="#impl-ToOwned-for-WeightedError">ToOwned</a></li><li><a href="#impl-ToString-for-WeightedError">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-WeightedError">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-WeightedError">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-WeightedError">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions::weighted</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Enum <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">weighted</a>::<wbr><a class="enum" href="#">WeightedError</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/weighted_index.rs.html#431-444">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust enum"><code>pub enum WeightedError { + NoItem, + InvalidWeight, + AllWeightsZero, + TooMany, +}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Error type returned from <code>WeightedIndex::new</code>.</p> +</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><h3 id="variant.NoItem" class="variant small-section-header"><a href="#variant.NoItem" class="anchor field"></a><code>NoItem</code></h3><div class="docblock"><p>The provided weight collection contains no items.</p> +</div><h3 id="variant.InvalidWeight" class="variant small-section-header"><a href="#variant.InvalidWeight" class="anchor field"></a><code>InvalidWeight</code></h3><div class="docblock"><p>A weight is either less than zero, greater than the supported maximum, +NaN, or otherwise invalid.</p> +</div><h3 id="variant.AllWeightsZero" class="variant small-section-header"><a href="#variant.AllWeightsZero" class="anchor field"></a><code>AllWeightsZero</code></h3><div class="docblock"><p>All items in the provided weight collection are zero.</p> +</div><h3 id="variant.TooMany" class="variant small-section-header"><a href="#variant.TooMany" class="anchor field"></a><code>TooMany</code></h3><div class="docblock"><p>Too many weights are provided (length greater than <code>u32::MAX</code>)</p> +</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-Clone-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-Debug-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Display-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#449-458">source</a><a href="#impl-Display-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#450-457">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Error-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#447">source</a><a href="#impl-Error-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.source" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#83">source</a></span><a href="#method.source" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.source" class="fnname">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)></h4></section></summary><div class='docblock'>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.source">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.description" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#109">source</a></span><a href="#method.description" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.description" class="fnname">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.str.html">str</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.42.0: use the Display impl or to_string()</span></div></span><div class='docblock'> <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.description">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cause" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#119">source</a></span><a href="#method.cause" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.cause" class="fnname">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.33.0: replaced by Error::source, which can support downcasting</span></div></span></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.provide" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#193">source</a><a href="#method.provide" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.provide" class="fnname">provide</a>(&'a self, demand: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.Demand.html" title="struct core::any::Demand">Demand</a><'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>error_generic_member_access</code>)</span></div></span><div class='docblock'>Provides type based access to context intended for error reports. <a href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html#method.provide">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CWeightedError%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-PartialEq%3CWeightedError%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><section id="impl-Copy-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-Copy-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-Eq-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-Eq-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-StructuralEq-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-StructuralEq-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralEq.html" title="trait core::marker::StructuralEq">StructuralEq</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-StructuralPartialEq-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#430">source</a><a href="#impl-StructuralPartialEq-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-WeightedError" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-Send-for-WeightedError" class="impl has-srclink"><a href="#impl-Send-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-Sync-for-WeightedError" class="impl has-srclink"><a href="#impl-Sync-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-Unpin-for-WeightedError" class="impl has-srclink"><a href="#impl-Unpin-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section><section id="impl-UnwindSafe-for-WeightedError" class="impl has-srclink"><a href="#impl-UnwindSafe-for-WeightedError" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Provider-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#197">source</a><a href="#impl-Provider-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<E> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html" title="trait core::any::Provider">Provider</a> for E<span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.provide-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/error.rs.html#201">source</a><a href="#method.provide-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html#tymethod.provide" class="fnname">provide</a>(&'a self, demand: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.Demand.html" title="struct core::any::Demand">Demand</a><'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>provide_any</code>)</span></div></span><div class='docblock'>Data providers should implement this method to provide <em>all</em> values they are able to +provide by using <code>demand</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Provider.html#tymethod.provide">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToString-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/string.rs.html#2526">source</a><a href="#impl-ToString-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/string.rs.html#2532">source</a><a href="#method.to_string" class="anchor"></a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.66.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-WeightedError" class="impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-WeightedError" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/index.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/index.html new file mode 100644 index 0000000..89f22ce --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/index.html @@ -0,0 +1,5 @@ +<!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="Weighted index sampling"><meta name="keywords" content="rust, rustlang, rust-lang, weighted"><title>rand::distributions::weighted - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod"><!--[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">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">Module weighted</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a class="mod" href="#">weighted</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/weighted.rs.html#9-47">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.8.0: use rand::distributions::{WeightedIndex, WeightedError} instead</span></div></span><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Weighted index sampling</p> +<p>This module is deprecated. Use <a href="struct.WeightedIndex.html" title="crate::distributions::WeightedIndex"><code>crate::distributions::WeightedIndex</code></a> and +<a href="enum.WeightedError.html" title="crate::distributions::WeightedError"><code>crate::distributions::WeightedError</code></a> instead.</p> +</div></details><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="alias_method/index.html" title="rand::distributions::weighted::alias_method mod">alias_method</a><span class="stab deprecated" title="">Deprecated</span></div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.WeightedIndex.html" title="rand::distributions::weighted::WeightedIndex struct">WeightedIndex</a></div><div class="item-right docblock-short">A distribution using weighted sampling of discrete items</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.WeightedError.html" title="rand::distributions::weighted::WeightedError enum">WeightedError</a></div><div class="item-right docblock-short">Error type returned from <code>WeightedIndex::new</code>.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/sidebar-items.js b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/sidebar-items.js new file mode 100644 index 0000000..622d089 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":[["WeightedError","Error type returned from `WeightedIndex::new`."]],"mod":[["alias_method",""]],"struct":[["WeightedIndex","A distribution using weighted sampling of discrete items"]]};
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/struct.WeightedIndex.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/struct.WeightedIndex.html new file mode 100644 index 0000000..e9c39d2 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted/struct.WeightedIndex.html @@ -0,0 +1,63 @@ +<!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="A distribution using weighted sampling of discrete items"><meta name="keywords" content="rust, rustlang, rust-lang, WeightedIndex"><title>WeightedIndex in rand::distributions::weighted - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" 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><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" 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><h2 class="location"><a href="#">WeightedIndex</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.new">new</a></li><li><a href="#method.update_weights">update_weights</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-WeightedIndex%3CX%3E">Clone</a></li><li><a href="#impl-Debug-for-WeightedIndex%3CX%3E">Debug</a></li><li><a href="#impl-Distribution%3Cusize%3E-for-WeightedIndex%3CX%3E">Distribution<usize></a></li><li><a href="#impl-PartialEq%3CWeightedIndex%3CX%3E%3E-for-WeightedIndex%3CX%3E">PartialEq<WeightedIndex<X>></a></li><li><a href="#impl-StructuralPartialEq-for-WeightedIndex%3CX%3E">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-WeightedIndex%3CX%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-WeightedIndex%3CX%3E">Send</a></li><li><a href="#impl-Sync-for-WeightedIndex%3CX%3E">Sync</a></li><li><a href="#impl-Unpin-for-WeightedIndex%3CX%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-WeightedIndex%3CX%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-WeightedIndex%3CX%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-WeightedIndex%3CX%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-WeightedIndex%3CX%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-WeightedIndex%3CX%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-WeightedIndex%3CX%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-WeightedIndex%3CX%3E">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-WeightedIndex%3CX%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-WeightedIndex%3CX%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E-for-WeightedIndex%3CX%3E">VZip<V></a></li></ul></section><h2><a href="index.html">In rand::distributions::weighted</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">weighted</a>::<wbr><a class="struct" href="#">WeightedIndex</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/rand/distributions/weighted_index.rs.html#81-85">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct WeightedIndex<X: <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A distribution using weighted sampling of discrete items</p> +<p>Sampling a <code>WeightedIndex</code> distribution returns the index of a randomly +selected element from the iterator used when the <code>WeightedIndex</code> was +created. The chance of a given element being picked is proportional to the +value of the element. The weights can use any type <code>X</code> for which an +implementation of <a href="../struct.Uniform.html"><code>Uniform<X></code></a> exists.</p> +<h2 id="performance"><a href="#performance">Performance</a></h2> +<p>Time complexity of sampling from <code>WeightedIndex</code> is <code>O(log N)</code> where +<code>N</code> is the number of weights. As an alternative, +<a href="https://docs.rs/rand_distr/*/rand_distr/weighted_alias/index.html"><code>rand_distr::weighted_alias</code></a> +supports <code>O(1)</code> sampling, but with much higher initialisation cost.</p> +<p>A <code>WeightedIndex<X></code> contains a <code>Vec<X></code> and a <a href="../struct.Uniform.html"><code>Uniform<X></code></a> and so its +size is the sum of the size of those objects, possibly plus some alignment.</p> +<p>Creating a <code>WeightedIndex<X></code> will allocate enough space to hold <code>N - 1</code> +weights of type <code>X</code>, where <code>N</code> is the number of weights. However, since +<code>Vec</code> doesn’t guarantee a particular growth strategy, additional memory +might be allocated but not used. Since the <code>WeightedIndex</code> object also +contains, this might cause additional allocations, though for primitive +types, <a href="../struct.Uniform.html"><code>Uniform<X></code></a> doesn’t allocate any memory.</p> +<p>Sampling from <code>WeightedIndex</code> will result in a single call to +<code>Uniform<X>::sample</code> (method of the <a href="../trait.Distribution.html" title="Distribution"><code>Distribution</code></a> trait), which typically +will request a single value from the underlying <a href="../../trait.RngCore.html"><code>RngCore</code></a>, though the +exact number depends on the implementation of <code>Uniform<X>::sample</code>.</p> +<h2 id="example"><a href="#example">Example</a></h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::prelude::<span class="kw-2">*</span>; +<span class="kw">use </span>rand::distributions::WeightedIndex; + +<span class="kw">let </span>choices = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>weights = [<span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]; +<span class="kw">let </span>dist = WeightedIndex::new(<span class="kw-2">&</span>weights).unwrap(); +<span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng(); +<span class="kw">for _ in </span><span class="number">0</span>..<span class="number">100 </span>{ + <span class="comment">// 50% chance to print 'a', 25% chance to print 'b', 25% chance to print 'c' + </span><span class="macro">println!</span>(<span class="string">"{}"</span>, choices[dist.sample(<span class="kw-2">&mut </span>rng)]); +} + +<span class="kw">let </span>items = [(<span class="string">'a'</span>, <span class="number">0</span>), (<span class="string">'b'</span>, <span class="number">3</span>), (<span class="string">'c'</span>, <span class="number">7</span>)]; +<span class="kw">let </span>dist2 = WeightedIndex::new(items.iter().map(|item| item.<span class="number">1</span>)).unwrap(); +<span class="kw">for _ in </span><span class="number">0</span>..<span class="number">100 </span>{ + <span class="comment">// 0% chance to print 'a', 30% chance to print 'b', 70% chance to print 'c' + </span><span class="macro">println!</span>(<span class="string">"{}"</span>, items[dist2.sample(<span class="kw-2">&mut </span>rng)].<span class="number">0</span>); +}</code></pre></div> +</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#87-221">source</a><a href="#impl-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#96-131">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fnname">new</a><I>(weights: I) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X>, <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,<br> I::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>: <a class="trait" href="../uniform/trait.SampleBorrow.html" title="trait rand::distributions::uniform::SampleBorrow">SampleBorrow</a><X>,<br> X: for<'a> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.AddAssign.html" title="trait core::ops::arith::AddAssign">AddAssign</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</span></h4></section></summary><div class="docblock"><p>Creates a new a <code>WeightedIndex</code> <a href="../trait.Distribution.html" title="Distribution"><code>Distribution</code></a> using the values +in <code>weights</code>. The weights can use any type <code>X</code> for which an +implementation of <a href="../struct.Uniform.html"><code>Uniform<X></code></a> exists.</p> +<p>Returns an error if the iterator is empty, if any weight is <code>< 0</code>, or +if its total value is 0.</p> +</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.update_weights" class="method has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#142-220">source</a><h4 class="code-header">pub fn <a href="#method.update_weights" class="fnname">update_weights</a>(<br> &mut self,<br> new_weights: &[(<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>X)]<br>) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.unit.html">()</a>, <a class="enum" href="enum.WeightedError.html" title="enum rand::distributions::weighted::WeightedError">WeightedError</a>><span class="where fmt-newline">where<br> X: for<'a> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.AddAssign.html" title="trait core::ops::arith::AddAssign">AddAssign</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>X> + for<'a> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/arith/trait.SubAssign.html" title="trait core::ops::arith::SubAssign">SubAssign</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&'a </a>X> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</span></h4></section></summary><div class="docblock"><p>Update a subset of weights, without changing the number of weights.</p> +<p><code>new_weights</code> must be sorted by the index.</p> +<p>Using this method instead of <code>new</code> might be more efficient if only a small number of +weights is modified. No allocations are performed, unless the weight type <code>X</code> uses +allocation internally.</p> +<p>In case of error, <code>self</code> is not modified.</p> +</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#impl-Clone-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="../uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#impl-Debug-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="../uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.66.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.66.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Distribution%3Cusize%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#223-240">source</a><a href="#impl-Distribution%3Cusize%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="../trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><<a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#226-239">source</a><a href="#method.sample" class="anchor"></a><h4 class="code-header">fn <a href="../trait.Distribution.html#tymethod.sample" class="fnname">sample</a><R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Generate a random value of <code>T</code>, using <code>rng</code> as the source of randomness.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sample_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/distribution.rs.html#73-83">source</a><a href="#method.sample_iter" class="anchor"></a><h4 class="code-header">fn <a href="../trait.Distribution.html#method.sample_iter" class="fnname">sample_iter</a><R>(self, rng: R) -> <a class="struct" href="../struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><Self, R, T><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="../struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T></span><code class="content"><span class="where fmt-newline">impl<D, R, T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../struct.DistIter.html" title="struct rand::distributions::DistIter">DistIter</a><D, R, T><span class="where fmt-newline">where<br> D: <a class="trait" href="../trait.Distribution.html" title="trait rand::distributions::Distribution">Distribution</a><T>,<br> R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a>,</span></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/1.66.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item" class="associatedtype">Item</a> = T;</span></code></span></span></span></span><span class="where fmt-newline">where<br> R: <a class="trait" href="../../trait.Rng.html" title="trait rand::Rng">Rng</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create an iterator that generates random values of <code>T</code>, using <code>rng</code> as +the source of randomness. <a href="../trait.Distribution.html#method.sample_iter">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/distribution.rs.html#102-112">source</a><a href="#method.map" class="anchor"></a><h4 class="code-header">fn <a href="../trait.Distribution.html#method.map" class="fnname">map</a><F, S>(self, func: F) -> <a class="struct" href="../struct.DistMap.html" title="struct rand::distributions::DistMap">DistMap</a><Self, F, T, S><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(T) -> S,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Create a distribution of values of ‘S’ by mapping the output of <code>Self</code> +through the closure <code>F</code> <a href="../trait.Distribution.html#method.map">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CWeightedIndex%3CX%3E%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#impl-PartialEq%3CWeightedIndex%3CX%3E%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> + <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X>> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X::<a class="associatedtype" href="../uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X>) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><section id="impl-StructuralPartialEq-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/rand/distributions/weighted_index.rs.html#78">source</a><a href="#impl-StructuralPartialEq-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X: <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a> + <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,<br> <X as <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="../uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Send-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-Send-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> <X as <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="../uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h3></section><section id="impl-Sync-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-Sync-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> <X as <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="../uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</span></h3></section><section id="impl-Unpin-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-Unpin-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> <X as <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="../uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<X> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.WeightedIndex.html" title="struct rand::distributions::weighted::WeightedIndex">WeightedIndex</a><X><span class="where fmt-newline">where<br> X: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,<br> <X as <a class="trait" href="../uniform/trait.SampleUniform.html" title="trait rand::distributions::uniform::SampleUniform">SampleUniform</a>>::<a class="associatedtype" href="../uniform/trait.SampleUniform.html#associatedtype.Sampler" title="type rand::distributions::uniform::SampleUniform::Sampler">Sampler</a>: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.66.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.66.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.66.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.66.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#82">source</a><a href="#impl-ToOwned-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#87">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/alloc/borrow.rs.html#91">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.66.0/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.66.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.66.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.66.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.66.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-WeightedIndex%3CX%3E" class="impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#221">source</a><a href="#impl-VZip%3CV%3E-for-WeightedIndex%3CX%3E" class="anchor"></a><h3 class="code-header">impl<V, T> <a class="trait" href="../../../ppv_lite86/types/trait.VZip.html" title="trait ppv_lite86::types::VZip">VZip</a><V> for T<span class="where fmt-newline">where<br> V: <a class="trait" href="../../../ppv_lite86/types/trait.MultiLane.html" title="trait ppv_lite86::types::MultiLane">MultiLane</a><T>,</span></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../../src/ppv_lite86/types.rs.html#226">source</a><a href="#method.vzip" class="anchor"></a><h4 class="code-header">fn <a href="../../../ppv_lite86/types/trait.VZip.html#tymethod.vzip" class="fnname">vzip</a>(self) -> V</h4></section></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="rand" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0 (69f9c33d7 2022-12-12) (Arch Linux rust 1:1.66.0-1)" ></div></body></html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted_index/enum.WeightedError.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted_index/enum.WeightedError.html new file mode 100644 index 0000000..443db1b --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted_index/enum.WeightedError.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/weighted/enum.WeightedError.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/weighted/enum.WeightedError.html">../../../rand/distributions/weighted/enum.WeightedError.html</a>...</p> + <script>location.replace("../../../rand/distributions/weighted/enum.WeightedError.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted_index/struct.WeightedIndex.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted_index/struct.WeightedIndex.html new file mode 100644 index 0000000..b314936 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/weighted_index/struct.WeightedIndex.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../rand/distributions/weighted/struct.WeightedIndex.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../rand/distributions/weighted/struct.WeightedIndex.html">../../../rand/distributions/weighted/struct.WeightedIndex.html</a>...</p> + <script>location.replace("../../../rand/distributions/weighted/struct.WeightedIndex.html" + location.search + location.hash);</script> +</body> +</html>
\ No newline at end of file |