gndr_rust/lib.rs
1//! [Original Package](https://github.com/tjhorner/gndr)
2//!
3//! `gndr` is a breakthrough in automated gender detection.
4//!
5//! It uses advanced techniques and algorithms to determine the gender of a user by **just fucking asking them.**
6//!
7//! The API couldn't be simpler. All you need to do is **ask the user what gender they identify as** along with **what pronouns they use**, and the library will give you back which gender they are with 100% accuracy. Incredible.
8
9/**
10The mystical gender container.
11**/
12pub struct Gndr {
13 pub gender: String,
14 pub pronouns: Vec<String>
15}
16
17/**
18Calculates the user's gender using advanced techniques and algorithms.
19
20Determines the gender of a user by **fucking asking them**.
21
22Returns the gender in a Gndr struct with 100% accuracy. Incredible.
23
24```rust
25use gndr_rust::*;
26
27fn main() {
28 // what is this user's gender and pronouns?
29 let gender = identify_gender("non-binary".to_string(), vec!["he".to_string(), "they".to_string()]);
30}
31```
32Result:
33```
34Gndr{
35 gender: "non-binary",
36 pronouns: [ "he", "they" ]
37}
38```
39**/
40pub fn identify_gender (gender: String, pronouns: Vec<String>) -> Gndr {
41 return Gndr{
42 gender,
43 pronouns
44 }
45}