3 releases

0.1.2 Apr 16, 2019
0.1.1 Mar 30, 2018
0.1.0 Mar 29, 2018

#29 in #u8

Download history 94/week @ 2024-03-11 116/week @ 2024-03-18 152/week @ 2024-03-25 202/week @ 2024-04-01 67/week @ 2024-04-08 80/week @ 2024-04-15 109/week @ 2024-04-22 120/week @ 2024-04-29 83/week @ 2024-05-06 81/week @ 2024-05-13 68/week @ 2024-05-20 67/week @ 2024-05-27 72/week @ 2024-06-03 85/week @ 2024-06-10 135/week @ 2024-06-17 77/week @ 2024-06-24

374 downloads per month
Used in 18 crates (7 directly)

MIT license

9KB
148 lines

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