mockd

Crates.iomockd
lib.rsmockd
version0.4.30
sourcesrc
created_at2022-02-27 09:37:48.666554
updated_at2024-12-07 07:52:57.209889
descriptionFake data generator library with 130+ functions
homepage
repositoryhttps://github.com/jerus-org/mockd
max_upload_size
id540287
size268,728
Jeremiah Russell (jerusdp)

documentation

README

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

Commit count: 1279

cargo fmt