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="API documentation for the Rust `Weight` trait in crate `bdk_chain`."><title>Weight in bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method - 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="#">Weight</a></h2><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Weight-for-f32" title="f32">f32</a></li><li><a href="#impl-Weight-for-f64" title="f64">f64</a></li><li><a href="#impl-Weight-for-i128" title="i128">i128</a></li><li><a href="#impl-Weight-for-i16" title="i16">i16</a></li><li><a href="#impl-Weight-for-i32" title="i32">i32</a></li><li><a href="#impl-Weight-for-i64" title="i64">i64</a></li><li><a href="#impl-Weight-for-i8" title="i8">i8</a></li><li><a href="#impl-Weight-for-isize" title="isize">isize</a></li><li><a href="#impl-Weight-for-u128" title="u128">u128</a></li><li><a href="#impl-Weight-for-u16" title="u16">u16</a></li><li><a href="#impl-Weight-for-u32" title="u32">u32</a></li><li><a href="#impl-Weight-for-u64" title="u64">u64</a></li><li><a href="#impl-Weight-for-u8" title="u8">u8</a></li><li><a href="#impl-Weight-for-usize" title="usize">usize</a></li></ul><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>weighted::<wbr>alias_<wbr>method</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">weighted</a>::<wbr><a href="index.html">alias_method</a></span><h1>Trait <span class="trait">Weight</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/weighted.rs.html#35">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Weight { }</code></pre><span class="item-info"><div class="stab deprecated"><span class="emoji">๐</span><span>Deprecated since 0.8.0: moved to rand_distr crate</span></div></span><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">ยง</a></h2><section id="impl-Weight-for-f32" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#43">Source</a><a href="#impl-Weight-for-f32" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></h3></section><section id="impl-Weight-for-f64" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#43">Source</a><a href="#impl-Weight-for-f64" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></h3></section><section id="impl-Weight-for-i8" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#45">Source</a><a href="#impl-Weight-for-i8" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></h3></section><section id="impl-Weight-for-i16" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#45">Source</a><a href="#impl-Weight-for-i16" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h3></section><section id="impl-Weight-for-i32" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#45">Source</a><a href="#impl-Weight-for-i32" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h3></section><section id="impl-Weight-for-i64" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#45">Source</a><a href="#impl-Weight-for-i64" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h3></section><section id="impl-Weight-for-i128" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#46">Source</a><a href="#impl-Weight-for-i128" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></h3></section><section id="impl-Weight-for-isize" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#45">Source</a><a href="#impl-Weight-for-isize" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></h3></section><section id="impl-Weight-for-u8" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#44">Source</a><a href="#impl-Weight-for-u8" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h3></section><section id="impl-Weight-for-u16" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#44">Source</a><a href="#impl-Weight-for-u16" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h3></section><section id="impl-Weight-for-u32" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#44">Source</a><a href="#impl-Weight-for-u32" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h3></section><section id="impl-Weight-for-u64" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#44">Source</a><a href="#impl-Weight-for-u64" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h3></section><section id="impl-Weight-for-u128" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#46">Source</a><a href="#impl-Weight-for-u128" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></h3></section><section id="impl-Weight-for-usize" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/distributions/weighted.rs.html#44">Source</a><a href="#impl-Weight-for-usize" class="anchor">ยง</a><h3 class="code-header">impl <a class="trait" href="trait.Weight.html" title="trait bdk_chain::bitcoin::secp256k1::rand::distributions::weighted::alias_method::Weight">Weight</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h3></section><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">ยง</a></h2><div id="implementors-list"></div><script src="../../../../../../../trait.impl/rand/distributions/weighted/alias_method/trait.Weight.js" data-ignore-extern-crates="std" async></script></section></div></main></body></html>