Content-Length: 18249 | pFad | https://doc.rust-lang.org/std/iter/../clone/../random/trait.Distribution.html#tymethod.sample

Distribution in std::random - Rust

Distribution

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§









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/iter/../clone/../random/trait.Distribution.html#tymethod.sample

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy