Generator

Trait Generator 

Source
pub trait Generator<T>: GeneratorTolerance {
    // Required method
    fn generate(&self) -> T;
}
Expand description

Generates a value of type T

Required Methods§

Source

fn generate(&self) -> T

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<U, T: FnOnce() -> U> Generator<U> for Cell<Option<T>>

Source§

fn generate(&self) -> U

Implementors§

Source§

impl<U, T: Fn() -> U> Generator<U> for T