pub struct Event {
pub id: EntityId,
pub name: String,
pub event_type: EventType,
pub time_span: TimeSpan,
pub location: Option<EntityId>,
pub caused_by: Vec<EntityId>,
pub participants: Vec<Participant>,
pub state_changes: Vec<EventStateChange>,
pub description: String,
}Expand description
Something that happened: a battle, discovery, political shift, etc.
Fields§
§id: EntityIdUnique identifier for this event.
name: StringDisplay name.
event_type: EventTypeWhat kind of event this is.
time_span: TimeSpanWhen the event occurred (inclusive year range).
location: Option<EntityId>Where the event took place, if applicable.
caused_by: Vec<EntityId>Events that caused or led to this one.
participants: Vec<Participant>Actors involved and their roles.
state_changes: Vec<EventStateChange>State changes this event inflicted on entities.
description: StringFree-text description.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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