Struct initiative_core::world::npc::NpcData
source · pub struct NpcData {
pub name: Field<String>,
pub gender: Field<Gender>,
pub age: Field<Age>,
pub age_years: Field<u16>,
pub size: Field<Size>,
pub species: Field<Species>,
pub ethnicity: Field<Ethnicity>,
pub location_uuid: Field<Uuid>,
}
Fields§
§name: Field<String>
§gender: Field<Gender>
§age: Field<Age>
§age_years: Field<u16>
§size: Field<Size>
§species: Field<Species>
§ethnicity: Field<Ethnicity>
§location_uuid: Field<Uuid>
Implementations§
source§impl NpcData
impl NpcData
pub fn display_summary(&self) -> SummaryView<'_>
pub fn display_description(&self) -> DescriptionView<'_>
pub fn display_details( &self, uuid: Uuid, relations: NpcRelations, ) -> DetailsView<'_>
pub fn gender(&self) -> Gender
pub fn get_words() -> &'static [&'static str]
pub fn lock_all(&mut self)
pub fn apply_diff(&mut self, diff: &mut Self)
Trait Implementations§
source§impl Autocomplete for NpcData
impl Autocomplete for NpcData
fn autocomplete<'life0, 'life1, 'async_trait>(
input: &'life0 str,
_app_meta: &'life1 AppMeta,
) -> Pin<Box<dyn Future<Output = Vec<AutocompleteSuggestion>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
source§impl<'de> Deserialize<'de> for NpcData
impl<'de> Deserialize<'de> for NpcData
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Generate for NpcData
impl Generate for NpcData
fn regenerate(&mut self, rng: &mut impl Rng, demographics: &Demographics)
fn generate(rng: &mut impl Rng, demographics: &Demographics) -> Self
source§impl PartialEq for NpcData
impl PartialEq for NpcData
impl Eq for NpcData
impl StructuralPartialEq for NpcData
Auto Trait Implementations§
impl Freeze for NpcData
impl RefUnwindSafe for NpcData
impl Send for NpcData
impl Sync for NpcData
impl Unpin for NpcData
impl UnwindSafe for NpcData
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)