#trait

factory

Factory trait and its implementations

3 releases

0.1.2 Apr 16, 2019
0.1.1 Mar 30, 2018
0.1.0 Mar 29, 2018
Download history 28/week @ 2021-10-06 27/week @ 2021-10-13 44/week @ 2021-10-20 20/week @ 2021-10-27 38/week @ 2021-11-03 35/week @ 2021-11-10 31/week @ 2021-11-17 71/week @ 2021-11-24 48/week @ 2021-12-01 64/week @ 2021-12-08 30/week @ 2021-12-15 8/week @ 2021-12-22 19/week @ 2021-12-29 46/week @ 2022-01-05 72/week @ 2022-01-12 54/week @ 2022-01-19

192 downloads per month
Used in less than 7 crates

MIT license

9KB
148 lines

factory

factory Documentation Build Status Code Coverage License: MIT

This crate provides Factory trait and its implementations.

The trait makes it possible to create any number of instances of a specific type.

Documentation

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);

Dependencies