[][src]Trait factory::Factory

pub trait Factory {
    type Item;
    fn create(&self) -> Self::Item;
}

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

Associated Types

type Item

The type of instances created by this factory.

Loading content...

Required methods

fn create(&self) -> Self::Item

Creates an instance.

Loading content...

Implementations on Foreign Types

impl<T: ?Sized + Factory, '_> Factory for &'_ T[src]

type Item = T::Item

impl<T: ?Sized + Factory> Factory for Box<T>[src]

type Item = T::Item

Loading content...

Implementors

impl<T: Factory> Factory for SwappableFactory<T>[src]

type Item = T::Item

impl<T: Clone> Factory for CloneFactory<T>[src]

type Item = T

impl<T: Default> Factory for DefaultFactory<T>[src]

type Item = T

Loading content...