Crates.io | fake-rs |
lib.rs | fake-rs |
version | 0.1.0 |
source | src |
created_at | 2024-01-18 16:23:44.416262 |
updated_at | 2024-01-18 16:23:44.416262 |
description | A tool for testing native-to-target port latency, using Rust. |
homepage | https://github.com/lvillis/fake-rs |
repository | https://github.com/lvillis/fake-rs |
max_upload_size | |
id | 1104333 |
size | 522,259 |
fake-rs
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.
[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:
use fake_rs::get_random_user_agent;
let user_agent = get_random_user_agent();
let user_agent_chrome = get_chrome_user_agent();
use fake_rs::generate_name;
let name = generate_name();
use fake_rs::generate_phone;
let phone_number = generate_phone();
use fake_rs::generate_ip;
let ip_address = generate_ip();