191 lines
No EOL
38 KiB
HTML
191 lines
No EOL
38 KiB
HTML
<!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 `SampleRange` trait in crate `rand`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, SampleRange">
|
||
|
||
<title>rand::distributions::range::SampleRange - Rust</title>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../../normalize.css">
|
||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle">
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../../dark.css">
|
||
<link rel="stylesheet" type="text/css" href="../../../main.css" id="themeStyle">
|
||
<script src="../../../storage.js"></script>
|
||
|
||
|
||
<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">
|
||
|
||
</head>
|
||
<body class="rustdoc trait">
|
||
<!--[if lte IE 8]>
|
||
<div class="warning">
|
||
This old browser is unsupported and will most likely display funky
|
||
things.
|
||
</div>
|
||
<![endif]-->
|
||
|
||
|
||
|
||
<nav class="sidebar">
|
||
<div class="sidebar-menu">☰</div>
|
||
<a href='../../../rand/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk.png' alt='logo' width='100'></a>
|
||
<p class='location'>Trait SampleRange</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.construct_range">construct_range</a><a href="#tymethod.sample_range">sample_range</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-SampleRange">usize</a><a href="#impl-SampleRange">i16</a><a href="#impl-SampleRange">u16</a><a href="#impl-SampleRange">f64</a><a href="#impl-SampleRange">isize</a><a href="#impl-SampleRange">u64</a><a href="#impl-SampleRange">i32</a><a href="#impl-SampleRange">i64</a><a href="#impl-SampleRange">u8</a><a href="#impl-SampleRange">u32</a><a href="#impl-SampleRange">i8</a><a href="#impl-SampleRange">f32</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../../index.html'>rand</a>::<wbr><a href='../index.html'>distributions</a>::<wbr><a href='index.html'>range</a></p><script>window.sidebarCurrent = {name: 'SampleRange', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||
</nav>
|
||
|
||
<div class="theme-picker">
|
||
<button id="theme-picker" aria-label="Pick another theme!">
|
||
<img src="../../../brush.svg" width="18" alt="Pick another theme!">
|
||
</button>
|
||
<div id="theme-choices"></div>
|
||
</div>
|
||
<script src="../../../theme.js"></script>
|
||
<nav class="sub">
|
||
<form class="search-form js-only">
|
||
<div class="search-container">
|
||
<input class="search-input" name="search"
|
||
autocomplete="off"
|
||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||
type="search">
|
||
</div>
|
||
</form>
|
||
</nav>
|
||
|
||
<section id='main' class="content">
|
||
<h1 class='fqn'><span class='in-band'>Trait <a href='../../index.html'>rand</a>::<wbr><a href='../index.html'>distributions</a>::<wbr><a href='index.html'>range</a>::<wbr><a class="trait" href=''>SampleRange</a></span><span class='out-of-band'><span id='render-detail'>
|
||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||
[<span class='inner'>−</span>]
|
||
</a>
|
||
</span><a class='srclink' href='../../../src/rand/distributions/range.rs.html#78-88' title='goto source code'>[src]</a></span></h1>
|
||
<pre class='rust trait'>pub trait SampleRange {
|
||
fn <a href='#tymethod.construct_range' class='fnname'>construct_range</a>(low: Self, high: Self) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><Self>;
|
||
<div class='item-spacer'></div> fn <a href='#tymethod.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><Self>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> Self<br> <span class="where">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a></span>;
|
||
}</pre><div class='docblock'><p>The helper trait for types that have a sensible way to sample
|
||
uniformly between two values. This should not be used directly,
|
||
and is only to facilitate <code>Range</code>.</p>
|
||
</div>
|
||
<h2 id='required-methods' class='small-section-header'>
|
||
Required Methods<a href='#required-methods' class='anchor'></a>
|
||
</h2>
|
||
<div class='methods'>
|
||
<h3 id='tymethod.construct_range' class='method'><span id='construct_range.v' class='invisible'><code>fn <a href='#tymethod.construct_range' class='fnname'>construct_range</a>(low: Self, high: Self) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><Self></code></span></h3><div class='docblock'><p>Construct the <code>Range</code> object that <code>sample_range</code>
|
||
requires. This should not ever be called directly, only via
|
||
<code>Range::new</code>, which will check that <code>low < high</code>, so this
|
||
function doesn't have to repeat the check.</p>
|
||
</div><h3 id='tymethod.sample_range' class='method'><span id='sample_range.v' class='invisible'><code>fn <a href='#tymethod.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><Self>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> Self <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span></h3><div class='docblock'><p>Sample a value from the given <code>Range</code> with the given <code>Rng</code> as
|
||
a source of randomness.</p>
|
||
</div></div>
|
||
<h2 id='foreign-impls' class='small-section-header'>
|
||
Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl-SampleRange' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href='#impl-SampleRange' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range' class="method"><span id='construct_range.v-1' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range' class="method"><span id='sample_range.v-1' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-1' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code><a href='#impl-SampleRange-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-1' class="method"><span id='construct_range.v-2' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-1' class="method"><span id='sample_range.v-2' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-2' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code><a href='#impl-SampleRange-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-2' class="method"><span id='construct_range.v-3' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-2' class="method"><span id='sample_range.v-3' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-3' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a href='#impl-SampleRange-3' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#152-163' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-3' class="method"><span id='construct_range.v-4' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#153-159' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-3' class="method"><span id='sample_range.v-4' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#160-162' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-4' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href='#impl-SampleRange-4' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-4' class="method"><span id='construct_range.v-5' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-4' class="method"><span id='sample_range.v-5' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-5' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a href='#impl-SampleRange-5' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-5' class="method"><span id='construct_range.v-6' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-5' class="method"><span id='sample_range.v-6' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-6' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code><a href='#impl-SampleRange-6' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-6' class="method"><span id='construct_range.v-7' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-6' class="method"><span id='sample_range.v-7' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-7' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code><a href='#impl-SampleRange-7' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-7' class="method"><span id='construct_range.v-8' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-7' class="method"><span id='sample_range.v-8' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-8' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a href='#impl-SampleRange-8' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-8' class="method"><span id='construct_range.v-9' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-8' class="method"><span id='sample_range.v-9' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-9' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href='#impl-SampleRange-9' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-9' class="method"><span id='construct_range.v-10' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-9' class="method"><span id='sample_range.v-10' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-10' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code><a href='#impl-SampleRange-10' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#92-131' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-10' class="method"><span id='construct_range.v-11' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#100-115' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-10' class="method"><span id='sample_range.v-11' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#118-130' title='goto source code'>[src]</a></span></h4>
|
||
</div></span><h3 id='impl-SampleRange-11' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../../rand/distributions/range/trait.SampleRange.html" title="trait rand::distributions::range::SampleRange">SampleRange</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code><a href='#impl-SampleRange-11' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#152-163' title='goto source code'>[src]</a></span></h3>
|
||
<span class='docblock autohide'><div class='impl-items'><h4 id='method.construct_range-11' class="method"><span id='construct_range.v-12' class='invisible'><code>fn <a href='#method.construct_range' class='fnname'>construct_range</a>(low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#153-159' title='goto source code'>[src]</a></span></h4>
|
||
<h4 id='method.sample_range-11' class="method"><span id='sample_range.v-12' class='invisible'><code>fn <a href='#method.sample_range' class='fnname'>sample_range</a><R>(r: &<a class="struct" href="../../../rand/distributions/range/struct.Range.html" title="struct rand::distributions::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>>, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>R) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a> <span class="where fmt-newline">where<br> R: <a class="trait" href="../../../rand/trait.Rng.html" title="trait rand::Rng">Rng</a>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/rand/distributions/range.rs.html#160-162' title='goto source code'>[src]</a></span></h4>
|
||
</div></span>
|
||
<h2 id='implementors' class='small-section-header'>
|
||
Implementors<a href='#implementors' class='anchor'></a>
|
||
</h2>
|
||
<ul class='item-list' id='implementors-list'>
|
||
</ul><script type="text/javascript" async
|
||
src="../../../implementors/rand/distributions/range/trait.SampleRange.js">
|
||
</script></section>
|
||
<section id='search' class="content hidden"></section>
|
||
|
||
<section class="footer"></section>
|
||
|
||
<aside id="help" class="hidden">
|
||
<div>
|
||
<h1 class="hidden">Help</h1>
|
||
|
||
<div class="shortcuts">
|
||
<h2>Keyboard Shortcuts</h2>
|
||
|
||
<dl>
|
||
<dt><kbd>?</kbd></dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt><kbd>S</kbd></dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt><kbd>↑</kbd></dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt><kbd>↓</kbd></dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt><kbd>↹</kbd></dt>
|
||
<dd>Switch tab</dd>
|
||
<dt><kbd>⏎</kbd></dt>
|
||
<dd>Go to active search result</dd>
|
||
<dt><kbd>+</kbd></dt>
|
||
<dd>Expand all sections</dd>
|
||
<dt><kbd>-</kbd></dt>
|
||
<dd>Collapse all sections</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div class="infos">
|
||
<h2>Search Tricks</h2>
|
||
|
||
<p>
|
||
Prefix searches with a type followed by a colon (e.g.
|
||
<code>fn:</code>) to restrict the search to a given type.
|
||
</p>
|
||
|
||
<p>
|
||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||
<code>struct</code>, <code>enum</code>,
|
||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||
and <code>const</code>.
|
||
</p>
|
||
|
||
<p>
|
||
Search functions by type signature (e.g.
|
||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../../../";
|
||
window.currentCrate = "rand";
|
||
</script>
|
||
<script src="../../../main.js"></script>
|
||
<script defer src="../../../search-index.js"></script>
|
||
</body>
|
||
</html> |