Trait Generator

Source
pub trait Generator {
    type Output;

    // Required method
    fn generate(&mut self) -> Self::Output;
}
Expand description

Implemented by objects that generates other objects.

Required Associated Types§

Source

type Output

The type of the object generated.

Required Methods§

Source

fn generate(&mut self) -> Self::Output

Generate a new object.

This might be indeterministic.

Implementations on Foreign Types§

Source§

impl<T: Generator> Generator for Vec<T>

Source§

type Output = <T as Generator>::Output

Source§

fn generate(&mut self) -> Self::Output

Implementors§