Trait ParameterizedFactory

Source
pub trait ParameterizedFactory {
    type Item;
    type Parameter;

    // Required method
    fn create(&self, param: Self::Parameter) -> Self::Item;
}
Expand description

This trait allows for creating any number of instances of the Item type with the given parameter.

Required Associated Types§

Source

type Item

The type of instances created by this factory.

Source

type Parameter

The type of parameter.

Required Methods§

Source

fn create(&self, param: Self::Parameter) -> Self::Item

Creates an instance.

Implementations on Foreign Types§

Source§

impl<T: ?Sized + ParameterizedFactory> ParameterizedFactory for &T

Source§

impl<T: ?Sized + ParameterizedFactory> ParameterizedFactory for Box<T>

Implementors§