Crate factory [−] [src]
This crate provides Factory
trait and its implementations.
The trait makes it possible to create any number of instances of a specific type.
Examples
Creates default instances of u8
type:
use factory::{DefaultFactory, Factory}; let f = DefaultFactory::<u8>::new(); assert_eq!(f.create(), 0); assert_eq!(f.create(), 0);
Structs
CloneFactory |
A |
DefaultFactory |
A |
SwappableFactory |
A |
Traits
Factory |
This trait allows for creating any number of instances of the |