kgen

Trait Generator

Source
pub(crate) trait Generator<R>:
    FnMut(&mut ThreadRng) -> R
    + Send
    + Sync {
    // Required method
    fn clone_box(&self) -> Box<dyn Generator<R>>;
}

Required Methods§

Source

fn clone_box(&self) -> Box<dyn Generator<R>>

Trait Implementations§

Source§

impl<R> Clone for Box<dyn Generator<R>>
where R: 'static,

Source§

fn clone(&self) -> Box<dyn Generator<R>>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

Source§

impl<F, R> Generator<R> for F
where F: FnMut(&mut ThreadRng) -> R + Clone + Send + Sync + 'static,