Trait static_init::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

Object Safety§

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