3 releases
0.1.2 | Apr 16, 2019 |
---|---|
0.1.1 | Mar 30, 2018 |
0.1.0 | Mar 29, 2018 |
#1743 in Rust patterns
414 downloads per month
Used in 17 crates
(7 directly)
9KB
148 lines
factory
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);
lib.rs
:
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);