Skip to main content

EventKind

Enum EventKind 

Source
pub enum EventKind {
    MoveOrdered {
        army: ArmyId,
        from: TerritoryId,
        to: TerritoryId,
        arrival_at: SimTime,
    },
    ArmyArrived {
        army: ArmyId,
        territory: TerritoryId,
    },
    PersonMoveOrdered {
        person: PersonId,
        from: TerritoryId,
        to: TerritoryId,
        arrival_at: SimTime,
    },
    PersonArrived {
        person: PersonId,
        territory: TerritoryId,
    },
    LetterDelivered {
        letter: LetterId,
        carrier: PersonId,
        recipient: PersonId,
        territory: TerritoryId,
    },
    ReportDispatched {
        recipient: PersonId,
        army: ArmyId,
        arrives_at: SimTime,
    },
    KnowledgeUpdated {
        recipient: PersonId,
        army: ArmyId,
        known_location: TerritoryId,
    },
    KnowledgePublished {
        holder: KnowledgeHolderRef,
        record_count: u32,
    },
    DebugFieldChanged {
        entity: EntityRef,
        field: String,
        old_value: String,
        new_value: String,
    },
    Plugin {
        plugin: String,
        event_type: String,
    },
}

Variants§

§

MoveOrdered

Fields

§army: ArmyId
§arrival_at: SimTime
§

ArmyArrived

Fields

§army: ArmyId
§territory: TerritoryId
§

PersonMoveOrdered

Fields

§person: PersonId
§arrival_at: SimTime
§

PersonArrived

Fields

§person: PersonId
§territory: TerritoryId
§

LetterDelivered

Fields

§letter: LetterId
§carrier: PersonId
§recipient: PersonId
§territory: TerritoryId
§

ReportDispatched

Fields

§recipient: PersonId
§army: ArmyId
§arrives_at: SimTime
§

KnowledgeUpdated

Fields

§recipient: PersonId
§army: ArmyId
§known_location: TerritoryId
§

KnowledgePublished

Fields

§record_count: u32
§

DebugFieldChanged

Fields

§entity: EntityRef
§field: String
§old_value: String
§new_value: String
§

Plugin

Fields

§plugin: String
§event_type: String

Implementations§

Source§

impl EventKind

Source

pub const fn event_type(&self) -> &'static str

Source

pub fn qualified_event_type(&self) -> String

Returns the stable, display-oriented type identity for this event.

Built-in event kinds retain the same snake-case labels returned by Self::event_type. Plugin events are qualified with their registered plugin name and event type, separated by a dot. The two plugin-provided components are preserved as registered; no case folding or additional normalization is applied.

Trait Implementations§

Source§

impl Clone for EventKind

Source§

fn clone(&self) -> EventKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EventKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EventKind

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<EventKind, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for EventKind

Source§

impl PartialEq for EventKind

Source§

fn eq(&self, other: &EventKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for EventKind

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for EventKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.