spawnflake 0.2.9

Generate pattern based random data for mysql
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::configuration::config_model::GenericConfiguration;

type BoxFnBool = Box<dyn Fn(&GenericConfiguration, &str) -> bool>;
type BoxFnT<T> = Box<dyn Fn(&GenericConfiguration, &str) -> T>;
type BoxFnString = Box<dyn Fn(&str) -> Option<String>>;

pub struct DataGenerator<T> {
    pub generator_check: BoxFnBool,
    pub generator: BoxFnT<T>,
    pub randomiser: BoxFnString,
    pub default: String,
}