RandomGenerator

Trait RandomGenerator 

Source
pub trait RandomGenerator<Runtime, T: Async>
where Runtime: Async,
{ // Required methods fn generate_random(runtime: &Runtime) -> impl Future<Output = T> + Send; fn random_range( runtime: &Runtime, min: T, max: T, ) -> impl Future<Output = T> + Send; }

Required Methods§

Source

fn generate_random(runtime: &Runtime) -> impl Future<Output = T> + Send

Source

fn random_range( runtime: &Runtime, min: T, max: T, ) -> impl Future<Output = T> + Send

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§

Source§

impl<Component, Runtime, T: Async> RandomGenerator<Runtime, T> for Component
where Runtime: Async, Component: DelegateComponent<RandomGeneratorComponent>, Component::Delegate: RandomGenerator<Runtime, T>,