]> Untitled Git - bitcoindevkit.org/blob
fc8f7e82bf47fb7bea298ef8142c883dc526057f
[bitcoindevkit.org] /
1 <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="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-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../../static.files/rustdoc-5d1d17d0.css"><meta name="rustdoc-vars" data-root-path="../../../../../../" data-static-root-path="../../../../../../static.files/" data-current-crate="bdk_chain" data-themes="" data-resource-suffix="" data-rustdoc-version="1.86.0-nightly (f3d1d47fd 2025-01-20)" data-channel="nightly" data-search-js="search-ccb196c1.js" data-settings-js="settings-0f613d39.js" ><script src="../../../../../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><h2><a href="../../../../../../bdk_chain/index.html">bdk_<wbr>chain</a><span class="version">0.21.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Uniform<wbr>Sampler</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.X" title="X">X</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.new" title="new">new</a></li><li><a href="#tymethod.new_inclusive" title="new_inclusive">new_inclusive</a></li><li><a href="#tymethod.sample" title="sample">sample</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.sample_single" title="sample_single">sample_single</a></li><li><a href="#method.sample_single_inclusive" title="sample_single_inclusive">sample_single_inclusive</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In bdk_<wbr>chain::<wbr>bitcoin::<wbr>secp256k1::<wbr>rand::<wbr>distributions::<wbr>uniform</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../../../../index.html">bdk_chain</a>::<wbr><a href="../../../../index.html">bitcoin</a>::<wbr><a href="../../../index.html">secp256k1</a>::<wbr><a href="../../index.html">rand</a>::<wbr><a href="../index.html">distributions</a>::<wbr><a href="index.html">uniform</a></span><h1>Trait <span class="trait">UniformSampler</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#231">Source</a> </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>;
3
4 // Required methods
5 fn <a href="#tymethod.new" class="fn">new</a>&lt;B1, B2&gt;(low: B1, high: B2) -&gt; 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>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,
7 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;</span>;
8 <span class="item-spacer"></span> fn <a href="#tymethod.new_inclusive" class="fn">new_inclusive</a>&lt;B1, B2&gt;(low: B1, high: B2) -&gt; 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>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,
10 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;</span>;
11 <span class="item-spacer"></span> fn <a href="#tymethod.sample" class="fn">sample</a>&lt;R&gt;(&amp;self, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut R</a>) -&gt; 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>;
13
14 // Provided methods
15 fn <a href="#method.sample_single" class="fn">sample_single</a>&lt;R, B1, B2&gt;(low: B1, high: B2, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut R</a>) -&gt; 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>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,
18 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;</span> { ... }
19 <span class="item-spacer"></span> fn <a href="#method.sample_single_inclusive" class="fn">sample_single_inclusive</a>&lt;R, B1, B2&gt;(
20 low: B1,
21 high: B2,
22 rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut R</a>,
23 ) -&gt; 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>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,
26 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;</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>&lt;B1, B2&gt;(low: B1, high: B2) -&gt; 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>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,
35 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,</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 &lt; 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>&lt;B1, B2&gt;(low: B1, high: B2) -&gt; 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>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,
41 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,</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 &lt;= high</code> before
44 calling this.</p>
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>&lt;R&gt;(&amp;self, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut R</a>) -&gt; 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>&lt;R, B1, B2&gt;(low: B1, high: B2, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut R</a>) -&gt; 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>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,
50 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,</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>
59
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&lt;T: SampleUniform&gt;(lb: T, ub: T) -&gt; T {
62 <span class="kw">let </span><span class="kw-2">mut </span>rng = thread_rng();
63 &lt;T <span class="kw">as </span>SampleUniform&gt;::Sampler::sample_single(lb, ub, <span class="kw-2">&amp;mut </span>rng)
64 }</code></pre></div>
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>&lt;R, B1, B2&gt;(low: B1, high: B2, rng: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut R</a>) -&gt; 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>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,
68 B2: <a class="trait" href="trait.SampleBorrow.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::SampleBorrow">SampleBorrow</a>&lt;Self::<a class="associatedtype" href="trait.UniformSampler.html#associatedtype.X" title="type bdk_chain::bitcoin::secp256k1::rand::distributions::uniform::UniformSampler::X">X</a>&gt;,</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
73 via this method.
74 Results may not be identical.</p>
75 </div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></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 class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#750">Source</a><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 class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#1051">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-3" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#998">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-4" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#999">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-5" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#559">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-6" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#560">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-7" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#561">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-8" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#562">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-9" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#563">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-10" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#564">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-11" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#565">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-12" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#566">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-13" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#567">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-14" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#568">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-15" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#570">Source</a><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>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;</h3></section></summary><div class="impl-items"><section id="associatedtype.X-16" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/uniform.rs.html#569">Source</a><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>