EntropyConcreteGenerator

Trait EntropyConcreteGenerator 

Source
pub trait EntropyConcreteGenerator<TGenerator: EntropyGenerator>: Sized + ReprC {
    // Required method
    fn generate(generator: &TGenerator) -> Result<Self, TGenerator::Error>;
}
Expand description

Generates random type based on surrounding entropy, i.e. based on what the operating system provides as “true” randomness.

Similar to EntropyGenerator but works with a single type only.

Required Methods§

Source

fn generate(generator: &TGenerator) -> Result<Self, TGenerator::Error>

Generates a new random instance of itself.

§Errors

The same as EntropyGenerator::Error.

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.

Implementations on Foreign Types§

Source§

impl EntropyConcreteGenerator<StdEntropyGenerator> for i16

Source§

impl EntropyConcreteGenerator<StdEntropyGenerator> for i32

Source§

impl EntropyConcreteGenerator<StdEntropyGenerator> for i64

Source§

impl EntropyConcreteGenerator<StdEntropyGenerator> for isize

Source§

impl EntropyConcreteGenerator<StdEntropyGenerator> for u16

Source§

impl EntropyConcreteGenerator<StdEntropyGenerator> for u32

Source§

impl EntropyConcreteGenerator<StdEntropyGenerator> for u64

Source§

impl EntropyConcreteGenerator<StdEntropyGenerator> for usize

Implementors§