Enum initiative_core::world::thing::ThingData
source · pub enum ThingData {
Npc(NpcData),
Place(PlaceData),
}
Variants§
Implementations§
source§impl ThingData
impl ThingData
pub fn name(&self) -> &Field<String>
pub fn as_str(&self) -> &'static str
pub fn regenerate(&mut self, rng: &mut impl Rng, demographics: &Demographics)
pub fn gender(&self) -> Gender
pub fn place_data(&self) -> Option<&PlaceData>
pub fn npc_data(&self) -> Option<&NpcData>
pub fn display_summary(&self) -> SummaryView<'_>
pub fn display_description(&self) -> DescriptionView<'_>
pub fn display_details( &self, uuid: Uuid, relations: ThingRelations, ) -> DetailsView<'_>
pub fn lock_all(&mut self)
pub fn try_apply_diff(&mut self, diff: &mut Self) -> Result<(), ()>
Trait Implementations§
source§impl<'de> Deserialize<'de> for ThingData
impl<'de> Deserialize<'de> for ThingData
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<T: Into<ThingData>> From<ParsedThing<T>> for ThingData
impl<T: Into<ThingData>> From<ParsedThing<T>> for ThingData
source§fn from(input: ParsedThing<T>) -> Self
fn from(input: ParsedThing<T>) -> Self
Converts to this type from the input type.
source§impl PartialEq for ThingData
impl PartialEq for ThingData
impl Eq for ThingData
impl StructuralPartialEq for ThingData
Auto Trait Implementations§
impl Freeze for ThingData
impl RefUnwindSafe for ThingData
impl Send for ThingData
impl Sync for ThingData
impl Unpin for ThingData
impl UnwindSafe for ThingData
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
)