faker_rust/default/
educator.rs1use crate::base::sample;
4use crate::locale::{fetch_locale, sample_with_resolve};
5
6pub fn school_name() -> String {
8 fetch_locale("educator.school_name", "en")
9 .map(|v| sample(&v))
10 .unwrap_or_else(|| "Bluemeadow".to_string())
11}
12
13pub fn university() -> String {
15 fetch_locale("educator.university", "en")
16 .map(|v| sample_with_resolve(&v, Some("educator")))
17 .unwrap_or_else(|| "Bluemeadow University".to_string())
18}
19
20pub fn secondary_school() -> String {
22 fetch_locale("educator.secondary_school", "en")
23 .map(|v| sample_with_resolve(&v, Some("educator")))
24 .unwrap_or_else(|| "Bluemeadow High".to_string())
25}
26
27pub fn primary_school() -> String {
29 fetch_locale("educator.primary_school", "en")
30 .map(|v| sample_with_resolve(&v, Some("educator")))
31 .unwrap_or_else(|| "Bluemeadow Elementary School".to_string())
32}
33
34pub fn campus() -> String {
36 fetch_locale("educator.campus", "en")
37 .map(|v| sample_with_resolve(&v, Some("educator")))
38 .unwrap_or_else(|| "Bluemeadow Campus".to_string())
39}
40
41pub fn subject() -> String {
43 fetch_locale("educator.subject", "en")
44 .map(|v| sample(&v))
45 .unwrap_or_else(|| "Science".to_string())
46}
47
48pub fn degree() -> String {
50 fetch_locale("educator.degree", "en")
51 .map(|v| sample_with_resolve(&v, Some("educator")))
52 .unwrap_or_else(|| "Bachelor of Science".to_string())
53}
54
55pub fn course_name() -> String {
57 fetch_locale("educator.course_name", "en")
58 .map(|v| sample_with_resolve(&v, Some("educator")))
59 .unwrap_or_else(|| "Science 101".to_string())
60}
61
62pub fn university_type() -> String {
64 fetch_locale("educator.tertiary.university_type", "en")
65 .map(|v| sample(&v))
66 .unwrap_or_else(|| "University".to_string())
67}
68
69pub fn degree_type() -> String {
71 fetch_locale("educator.tertiary.degree.type", "en")
72 .map(|v| sample(&v))
73 .unwrap_or_else(|| "Bachelor of".to_string())
74}