pub struct NamePool {
pub first_names_male: Vec<&'static str>,
pub first_names_female: Vec<&'static str>,
pub last_names: Vec<&'static str>,
pub culture: NameCulture,
}Expand description
Pool of names for a specific culture.
Fields§
§first_names_male: Vec<&'static str>Male first names
first_names_female: Vec<&'static str>Female first names
last_names: Vec<&'static str>Last names / family names
culture: NameCultureThe culture this pool represents
Implementations§
Source§impl NamePool
impl NamePool
Sourcepub fn western_us() -> Self
pub fn western_us() -> Self
Create a Western US name pool.
Sourcepub fn for_culture(culture: NameCulture) -> Self
pub fn for_culture(culture: NameCulture) -> Self
Get a name pool for a specific culture.
Sourcepub fn generate_name(&self, rng: &mut impl Rng) -> PersonName
pub fn generate_name(&self, rng: &mut impl Rng) -> PersonName
Generate a random name from this pool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NamePool
impl RefUnwindSafe for NamePool
impl Send for NamePool
impl Sync for NamePool
impl Unpin for NamePool
impl UnwindSafe for NamePool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more