31 releases
new 0.4.30 | Dec 7, 2024 |
---|---|
0.4.29 | Nov 22, 2024 |
0.4.26 | Oct 26, 2024 |
0.4.12 | Jul 27, 2024 |
0.2.0 | Mar 6, 2022 |
#159 in Algorithms
2,470 downloads per month
Used in hcaptcha
270KB
11K
SLoC
mockd
Update to fakeit, a Rust port of the famous Go fakeit library with more than 130 functions.
Usage
Add mockd to the dependencies (typically dev-dependencies) in Cargo.toml
[dev-dependencies]
mockd = "0.4.30"
The contact info struct contains a phone number and email string.
let credit_card = mockd::payment::credit_card();
println!("Credit card: {:#?}", credit_card);
Mockd provides mock data in the following categories:
- address
- animal
- beer
- bool_rand
- colour
- company
- contact
- currency
- datetime
- file
- generator
- hacker
- hipster
- image
- internet
- job
- language
- log_level
- name
- password
- payment
- person
- status_code
- unique
- user_agent
- vehicle
- words
Each category is enabled by a feature of the same name. All features can be enabled using the feature "all".
Full documentation is available at docs.rs
Dependencies
~0–630KB