Struct initiative_core::world::thing::Thing
source · pub struct Thing {
pub uuid: Uuid,
pub data: ThingData,
}
Fields§
§uuid: Uuid
§data: ThingData
Implementations§
source§impl Thing
impl Thing
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 display_summary(&self) -> SummaryView<'_>
pub fn display_description(&self) -> DescriptionView<'_>
pub fn display_details(&self, relations: ThingRelations) -> DetailsView<'_>
pub fn lock_all(&mut self)
pub fn try_apply_diff(&mut self, diff: &mut ThingData) -> Result<(), ()>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Thing
impl<'de> Deserialize<'de> for Thing
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 PartialEq for Thing
impl PartialEq for Thing
impl Eq for Thing
impl StructuralPartialEq for Thing
Auto Trait Implementations§
impl Freeze for Thing
impl RefUnwindSafe for Thing
impl Send for Thing
impl Sync for Thing
impl Unpin for Thing
impl UnwindSafe for Thing
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
)