Trait Distribution

Source
pub trait Distribution<T> {
    // Required method
    fn sample(&self, source: &mut (impl RandomSource + ?Sized)) -> T;
}
🔬This is a nightly-only experimental API. (random #130703)
Expand description

A trait representing a distribution of random values for a type.

Required Methods§

Source

fn sample(&self, source: &mut (impl RandomSource + ?Sized)) -> T

🔬This is a nightly-only experimental API. (random #130703)

Samples a random value from the distribution, using the specified random source.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy