5 releases (3 breaking)

0.4.1 Dec 5, 2022
0.4.0 Oct 1, 2022
0.3.0 May 1, 2022
0.2.0 Mar 6, 2022
0.1.1 Feb 27, 2022

#267 in Rust patterns

Download history 171/week @ 2023-01-26 314/week @ 2023-02-02 275/week @ 2023-02-09 174/week @ 2023-02-16 111/week @ 2023-02-23 65/week @ 2023-03-02 532/week @ 2023-03-09 731/week @ 2023-03-16 1036/week @ 2023-03-23 582/week @ 2023-03-30 686/week @ 2023-04-06 510/week @ 2023-04-13 463/week @ 2023-04-20 497/week @ 2023-04-27 482/week @ 2023-05-04 138/week @ 2023-05-11

1,678 downloads per month
Used in hcaptcha

MIT license

265KB
11K SLoC

mockd

Crates.io MIT licensed Build Status Rust Docs BuyMeaCoffee GitHubSponsors

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.1"

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–400KB