1 <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Helper trait handling actual uniform sampling."><title>UniformSampler in bdk_chain::bitcoin::secp256k1::rand::distributions::uniform - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../../../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../../../../../" data-static-root-path="../../../../../../static.files/" data-current-crate="bdk_chain" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (78a775127 2024-05-11)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../../../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../../../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><h2><a href="../../../../../../bdk_chain/index.html">bdk_chain</a><span class="version">0.20.0</span></h2></div><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="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In bdk_chain::bitcoin::secp256k1::rand::distributions::uniform</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../../../../index.html">bdk_chain</a>::<wbr><a href="../../../../index.html">bitcoin</a>::<wbr><a href="../../../index.html">secp256k1</a>::<wbr><a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a>::<wbr><a class="trait" href="#">UniformSampler</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#231">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait UniformSampler: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
2 type <a href="#associatedtype.X" class="associatedtype">X</a>;
5 fn <a href="#tymethod.new" class="fn">new</a><B1, B2>(low: B1, high: B2) -> Self
6 <span class="where">where B1: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,
7 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>></span>;
8 <span class="item-spacer"></span> fn <a href="#tymethod.new_inclusive" class="fn">new_inclusive</a><B1, B2>(low: B1, high: B2) -> Self
9 <span class="where">where B1: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,
10 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>></span>;
11 <span class="item-spacer"></span> fn <a href="#tymethod.sample" class="fn">sample</a><R>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>
12 <span class="where">where R: <a class="trait" href="../../trait.Rng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>;
15 fn <a href="#method.sample_single" class="fn">sample_single</a><R, B1, B2>(low: B1, high: B2, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>
16 <span class="where">where R: <a class="trait" href="../../trait.Rng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
17 B1: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,
18 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>></span> { ... }
19 <span class="item-spacer"></span> fn <a href="#method.sample_single_inclusive" class="fn">sample_single_inclusive</a><R, B1, B2>(
22 rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut R</a>
23 ) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>
24 <span class="where">where R: <a class="trait" href="../../trait.Rng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
25 B1: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,
26 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>></span> { ... }
27 }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Helper trait handling actual uniform sampling.</p>
28 <p>See the <a href="index.html" title="mod bdk_chain::bitcoin::secp256k1::rand::distributions::uniform">module documentation</a> on how to implement <a href="../struct.Uniform.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::Uniform"><code>Uniform</code></a> range
29 sampling for a custom type.</p>
30 <p>Implementation of <a href="trait.UniformSampler.html#method.sample_single" title="associated function bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::sample_single"><code>sample_single</code></a> is optional, and is only useful when
31 the implementation can be faster than <code>Self::new(low, high).sample(rng)</code>.</p>
32 </div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.X" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/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>
33 </div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.new" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#240-243">source</a><h4 class="code-header">fn <a href="#tymethod.new" class="fn">new</a><B1, B2>(low: B1, high: B2) -> Self<div class="where">where
34 B1: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,
35 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,</div></h4></section></summary><div class="docblock"><p>Construct self, with inclusive lower bound and exclusive upper bound
36 <code>[low, high)</code>.</p>
37 <p>Usually users should not call this directly but instead use
38 <code>Uniform::new</code>, which asserts that <code>low < high</code> before calling this.</p>
39 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.new_inclusive" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#250-253">source</a><h4 class="code-header">fn <a href="#tymethod.new_inclusive" class="fn">new_inclusive</a><B1, B2>(low: B1, high: B2) -> Self<div class="where">where
40 B1: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,
41 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,</div></h4></section></summary><div class="docblock"><p>Construct self, with inclusive bounds <code>[low, high]</code>.</p>
42 <p>Usually users should not call this directly but instead use
43 <code>Uniform::new_inclusive</code>, which asserts that <code>low <= high</code> before
45 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.sample" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#256">source</a><h4 class="code-header">fn <a href="#tymethod.sample" class="fn">sample</a><R>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a><div class="where">where
46 R: <a class="trait" href="../../trait.Rng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Sample a value.</p>
47 </div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.sample_single" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#277-280">source</a><h4 class="code-header">fn <a href="#method.sample_single" class="fn">sample_single</a><R, B1, B2>(low: B1, high: B2, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a><div class="where">where
48 R: <a class="trait" href="../../trait.Rng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
49 B1: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,
50 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,</div></h4></section></summary><div class="docblock"><p>Sample a single value uniformly from a range with inclusive lower bound
51 and exclusive upper bound <code>[low, high)</code>.</p>
52 <p>By default this is implemented using
53 <code>UniformSampler::new(low, high).sample(rng)</code>. However, for some types
54 more optimal implementations for single usage may be provided via this
55 method (which is the case for integers and floats).
56 Results may not be identical.</p>
57 <p>Note that to use this method in a generic context, the type needs to be
58 retrieved via <code>SampleUniform::Sampler</code> as follows:</p>
60 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand::{thread_rng, distributions::uniform::{SampleUniform, UniformSampler}};
61 <span class="kw">fn </span>sample_from_range<T: SampleUniform>(lb: T, ub: T) -> T {
62 <span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng();
63 <T <span class="kw">as </span>SampleUniform>::Sampler::sample_single(lb, ub, <span class="kw-2">&mut </span>rng)
65 </div></details><details class="toggle method-toggle" open><summary><section id="method.sample_single_inclusive" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#294-297">source</a><h4 class="code-header">fn <a href="#method.sample_single_inclusive" class="fn">sample_single_inclusive</a><R, B1, B2>(low: B1, high: B2, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a><div class="where">where
66 R: <a class="trait" href="../../trait.Rng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
67 B1: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,
68 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a><Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>>,</div></h4></section></summary><div class="docblock"><p>Sample a single value uniformly from a range with inclusive lower bound
69 and inclusive upper bound <code>[low, high]</code>.</p>
70 <p>By default this is implemented using
71 <code>UniformSampler::new_inclusive(low, high).sample(rng)</code>. However, for
72 some types more optimal implementations for single usage may be provided
74 Results may not be identical.</p>
75 </div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformChar" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#749">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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformChar.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformChar">UniformChar</a></h3></section></summary><div class="impl-items"><section id="associatedtype.X-1" class="associatedtype trait-impl"><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/nightly/std/primitive.char.html">char</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformDuration" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#1050">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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformDuration.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformDuration">UniformDuration</a></h3></section></summary><div class="impl-items"><section id="associatedtype.X-2" class="associatedtype trait-impl"><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/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformFloat%3Cf32%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformFloat.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformFloat">UniformFloat</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-3" class="associatedtype trait-impl"><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/nightly/std/primitive.f32.html">f32</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformFloat%3Cf64%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformFloat.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformFloat">UniformFloat</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-4" class="associatedtype trait-impl"><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/nightly/std/primitive.f64.html">f64</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci8%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-5" class="associatedtype trait-impl"><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/nightly/std/primitive.i8.html">i8</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci16%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-6" class="associatedtype trait-impl"><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/nightly/std/primitive.i16.html">i16</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci32%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-7" class="associatedtype trait-impl"><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/nightly/std/primitive.i32.html">i32</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci64%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-8" class="associatedtype trait-impl"><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/nightly/std/primitive.i64.html">i64</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Ci128%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-9" class="associatedtype trait-impl"><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/nightly/std/primitive.i128.html">i128</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cisize%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-10" class="associatedtype trait-impl"><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/nightly/std/primitive.isize.html">isize</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu8%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-11" class="associatedtype trait-impl"><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/nightly/std/primitive.u8.html">u8</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu16%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-12" class="associatedtype trait-impl"><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/nightly/std/primitive.u16.html">u16</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu32%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-13" class="associatedtype trait-impl"><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/nightly/std/primitive.u32.html">u32</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu64%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-14" class="associatedtype trait-impl"><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/nightly/std/primitive.u64.html">u64</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cu128%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-15" class="associatedtype trait-impl"><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/nightly/std/primitive.u128.html">u128</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-UniformSampler-for-UniformInt%3Cusize%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/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 bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler">UniformSampler</a> for <a class="struct" href="struct.UniformInt.html" title="struct bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformInt">UniformInt</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.X-16" class="associatedtype trait-impl"><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/nightly/std/primitive.usize.html">usize</a></h4></section></div></details></div><script src="../../../../../../trait.impl/rand/distributions/uniform/trait.UniformSampler.js" data-ignore-extern-crates="rand" async></script></section></div></main></body></html>