Struct warlocks_cauldron::Payment
source · pub struct Payment;Expand description
Methods collection for generating data related to payments
Implementations§
source§impl Payment
impl Payment
sourcepub fn bitcoin_address() -> String
pub fn bitcoin_address() -> String
Generate a random bitcoin address
sourcepub fn ethereum_address() -> String
pub fn ethereum_address() -> String
Generate a random Ethereum address
sourcepub fn credit_card_network() -> &'static str
pub fn credit_card_network() -> &'static str
Generate a random credit card number
sourcepub fn credit_card_number(card_type: Option<CardType>) -> String
pub fn credit_card_number(card_type: Option<CardType>) -> String
Generate a random credit card number
sourcepub fn credit_card_expiration_date(minimum: i32, maximum: i32) -> String
pub fn credit_card_expiration_date(minimum: i32, maximum: i32) -> String
Generate a random expiration date for credit card
Arguments:
minimum- Date of issuemaximum- Maximum of expiration date
sourcepub fn credit_card() -> CreditCard
pub fn credit_card() -> CreditCard
Generate full credit card
Examples found in repository?
examples/datagen.rs (line 39)
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
fn main() {
println!("Address: {}", Address(Locale::EN).full_address());
println!("IMEI: {}", Code::imei());
println!("Mnemonic Phrase: {}", Cryptographic::mnemonic_phrase());
// start, end
println!("Datetime: {}", Datetime::datetime(1984, 2077));
println!("Filename: {}", File::file_name(None));
// scheme, tld, subdomains
println!("DSN: {}", Development::dsn(Some(DSNType::POSTGRES), Some(TLDType::CCTLD), Some(vec!["shop", "admin"])));
println!("Mac: {}", Internet::mac());
println!("Company: {}", Finance(Locale::EN).company());
println!("Drink: {}", Food(Locale::EN).drink());
println!("Manufacturer: {}", Hardware::manufacturer());
// sequence, length
println!("Choice: {:?}", Choice::pick(&vec!["a", "b", "c"], 5));
println!("Unique choice: {:?}", Choice::pick_unique(&vec!["a", "a", "b", "c"], 5));
// anything hashable object
println!("Increment a=1: {}", Numeric::increment("a"));
println!("Increment a+1: {}", Numeric::increment("a"));
println!("Increment 1=1: {}", Numeric::increment(1));
println!("Increment a+1: {}", Numeric::increment("a"));
println!("Project path: {}", Path::new(PlatformType::detect()).project_dir());
println!("Card struct: {:?}", Payment::credit_card());
// gender, reverse fullname
println!("Fullname: {}", Person(Locale::EN).full_name(Some(Gender::MALE), false));
println!("Telephone: {}", Person(Locale::EN).telephone(None));
println!("Username: {}", Person::username(Some("C.U.l.d"), Some((666, 777))));
// length of sequence
println!("DNA sequence: {}", Science::dna_sequence(10));
// words count
println!("Words: {:?}", Text(Locale::EN).words(5));
// None or Some(locale) for random or locale get transport code
println!("USA transport code: {}", Transport::vehicle_registration_code(Some(Locale::EN)));
}