Trait Generate

Source
trait Generate {
    // Required method
    fn gen_name(rng: &mut impl Rng, age: &Age, gender: &Gender) -> String;

    // Provided method
    fn regenerate(rng: &mut impl Rng, npc: &mut NpcData) { ... }
}

Required Methods§

Source

fn gen_name(rng: &mut impl Rng, age: &Age, gender: &Gender) -> String

Provided Methods§

Source

fn regenerate(rng: &mut impl Rng, npc: &mut NpcData)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Generate for initiative_core::world::npc::ethnicity::dragonborn::Ethnicity

Source§

impl Generate for initiative_core::world::npc::ethnicity::dwarvish::Ethnicity

Source§

impl Generate for initiative_core::world::npc::ethnicity::elvish::Ethnicity

Source§

impl Generate for initiative_core::world::npc::ethnicity::gnomish::Ethnicity

Source§

impl Generate for initiative_core::world::npc::ethnicity::halfling::Ethnicity

Source§

impl Generate for initiative_core::world::npc::ethnicity::human::Ethnicity

Source§

impl Generate for initiative_core::world::npc::ethnicity::orcish::Ethnicity

Source§

impl Generate for initiative_core::world::npc::ethnicity::tiefling::Ethnicity