12 releases

0.4.11 Jul 13, 2024
0.4.6 May 17, 2024
0.4.3 Dec 16, 2023
0.4.1 Dec 5, 2022
0.2.0 Mar 6, 2022

#175 in HTTP client

Download history 544/week @ 2024-04-02 419/week @ 2024-04-09 494/week @ 2024-04-16 705/week @ 2024-04-23 1578/week @ 2024-04-30 113/week @ 2024-05-07 567/week @ 2024-05-14 138/week @ 2024-05-21 168/week @ 2024-05-28 146/week @ 2024-06-04 234/week @ 2024-06-11 597/week @ 2024-06-18 836/week @ 2024-06-25 189/week @ 2024-07-02 307/week @ 2024-07-09 143/week @ 2024-07-16

1,490 downloads per month
Used in hcaptcha

MIT license

270KB
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.11"

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