fake-rs

Crates.iofake-rs
lib.rsfake-rs
version0.1.0
sourcesrc
created_at2024-01-18 16:23:44.416262
updated_at2024-01-18 16:23:44.416262
descriptionA tool for testing native-to-target port latency, using Rust.
homepagehttps://github.com/lvillis/fake-rs
repositoryhttps://github.com/lvillis/fake-rs
max_upload_size
id1104333
size522,259
(lvillis)

documentation

https://github.com/lvillis/fake-rs/README.md

README

Table of Contents↗️

fake-rs

crates.io version crates.io version build status say thanks

fake-rs is a Rust library for generating fake data such as random user agents, names, phone numbers, and IP addresses. It's designed to provide a simple and easy-to-use interface for developers to quickly generate mock data for testing, simulation, and other scenarios where random data is needed.

Features

  • User Agent Generation: Randomly select a user agent from a predefined list.
  • Name Generation: Randomly generate names.
  • Phone Number Generation: Generate properly formatted random phone numbers.
  • IP Address Generation: Generate random IPv4 addresses.

Usage

[dependencies]
fake-rs = { version = "0.1.0", features = ["user-agent", "name", "phone", "ip"] }

Each module provides one or more functions to generate specific types of data. Here are some usage examples:

User Agent Generation

use fake_rs::get_random_user_agent;
let user_agent = get_random_user_agent();
let user_agent_chrome = get_chrome_user_agent();

Name Generation

use fake_rs::generate_name;
let name = generate_name();

Phone Number Generation

use fake_rs::generate_phone;
let phone_number = generate_phone();

IP Address Generation

use fake_rs::generate_ip;
let ip_address = generate_ip();
Commit count: 0

cargo fmt