Skip to main content

Seeder

Trait Seeder 

Source
pub trait Seeder {
    // Required methods
    fn seed(&mut self) -> Seed;
    fn is_available() -> bool
       where Self: Sized;
}
Expand description

A trait representing a seeding strategy.

Required Methods§

Source

fn seed(&mut self) -> Seed

Generates a new seed.

Source

fn is_available() -> bool
where Self: Sized,

Check whether the seeder can be used on the current machine. This function may check if some required CPU features are available or if some OS features are available for example.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§