Fake
A Rust library for generating fake data.
Installation
Default (rand
is required):
[]
= "2.5"
= "0.8"
If you want to use #[derive(Dummy)]
:
= { = "2.5", =['derive']}
If you want the date and time features from chrono
:
= { = "2.5", =['chrono']}
If you want http
faker features:
= { = "2.5", =['http']}
If you want uuid
faker features:
= { = "2.5", =['uuid']}
If you want rust_decimal
faker features:
= { = "2.5", =['rust_decimal']}
If you want bigdecimal
faker features:
= { = "2.5", =['bigdecimal']}
If you want random_color
faker features:
= { = "2.5", =['random_color']}
Usage
use ;
use StdRng;
use SeedableRng;
Fakers with locale
Lorem
Word;
Words;
Sentence;
Sentences;
Paragraph;
Paragraphs;
Name
FirstName;
LastName;
Title;
Suffix;
Name;
NameWithTitle;
Number
Digit;
NumberWithFormat;
Boolean
Boolean;
Internet
FreeEmailProvider;
DomainSuffix;
FreeEmail;
SafeEmail;
Username;
Password;
IPv4;
IPv6;
IP;
MACAddress;
UserAgent;
HTTP
RfcStatusCode;
ValidStatusCode;
Color
HexColor;
RgbColor;
RgbaColor;
HslColor;
HslaColor;
Color;
Company
CompanySuffix;
CompanyName;
Buzzword;
BuzzwordMiddle;
BuzzwordTail;
CatchPhase;
BsVerb;
BsAdj;
BsNoun;
Bs;
Profession;
Industry;
Address
CityPrefix;
CitySuffix;
CityName;
CountryName;
CountryCode;
StreetSuffix;
StreetName;
TimeZone;
StateName;
StateAbbr;
SecondaryAddressType;
SecondaryAddress;
ZipCode;
PostCode;
BuildingNumber;
Latitude;
Longitude;
Geohash;
Automotive
LicencePlate;
Barcode
Isbn;
Isbn13;
Isbn10;
Phone Number
PhoneNumber;
CellNumber;
Date/Time
Time;
Date;
DateTime;
Duration;
DateTimeBefore;
DateTimeAfter;
DateTimeBetween;
Filesystem
FilePath;
FileName;
FileExtension;
DirPath;
Finance
Bic;
UUID
UUIDv1;
UUIDv3;
UUIDv4;
UUIDv5;
LICENSE
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.