pub trait CanGenerateRandom<T: Async>: Async {
// Required methods
fn generate_random(&self) -> impl Future<Output = T> + Send;
fn random_range(&self, min: T, max: T) -> impl Future<Output = T> + Send;
}Required Methods§
fn generate_random(&self) -> impl Future<Output = T> + Send
fn random_range(&self, 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.