person 0.1.0

Random identity generator for Rust
Documentation
  • Coverage
  • 60%
    9 out of 15 items documented1 out of 14 items with examples
  • Size
  • Source code size: 3.62 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 22.98 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • evil-personified/person.rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • evil-personified

person.rs

This crate allows you to create random and unique identities. This crate is also not fully optimized for speed, PRs are welcome.

Usage

Simply create a random identity by calling the Person::random function:

use person::Person;

let person = Person::random();

Create a random person that's legally allowed to drink:

use chrono::{Duration, Utc};
use person::Person;

// We're using 366 days as a year here to account for leap years and
// to make sure the person is at least 21 years old.
let person = Person::random_with_dob_range(
    Utc::now() - Duration::days(366 * 40),
    Utc::now() - Duration::days(366 * 21),
);

Or check out what this person might pick as their social media username:

use person::Person;

println!("{}", Person::random().get_random_username());