Skip to main content

Sample

Trait Sample 

Source
pub trait Sample: Sealed { }
Expand description

A type Rng::random can draw.

Implemented for bool, f32, f64, and the fixed-width integers u8..u64 and i8..i64. Sealed for the same reason as SampleRange: the width of the draw is part of the replay contract.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Sample for bool

Source§

impl Sample for f32

Source§

impl Sample for f64

Source§

impl Sample for i8

Source§

impl Sample for i16

Source§

impl Sample for i32

Source§

impl Sample for i64

Source§

impl Sample for u8

Source§

impl Sample for u16

Source§

impl Sample for u32

Source§

impl Sample for u64

Implementors§