Trait CanSample
pub trait CanSample<T> {
// Required method
fn sample(&mut self) -> T;
// Provided methods
fn sample_array<const N: usize>(&mut self) -> [T; N] { ... }
fn sample_vec(&mut self, n: usize) -> Vec<T> { ... }
}
Required Methods§
fn sample(&mut self) -> T
Provided Methods§
fn sample_array<const N: usize>(&mut self) -> [T; N]
fn sample_vec(&mut self, n: usize) -> Vec<T>
Object Safety§
This trait is not object safe.