Struct tuix_internal::Event[][src]

pub struct Event {
    pub origin: Entity,
    pub target: Entity,
    pub propagation: Propagation,
    pub consumable: bool,
    pub unique: bool,
    pub order: i32,
    pub message: Box<dyn Message + 'static, Global>,
    // some fields omitted
}
Expand description

An event is a wrapper around a message and provides metadata on how the event should be propagated through the tree

Fields

origin: Entitytarget: Entitypropagation: Propagationconsumable: boolunique: boolorder: i32message: Box<dyn Message + 'static, Global>

Implementations

Creates a new event with a specified message

Sets the target of the event

Sets the origin of the event

Specifies that the event is unique (only one of this event type should exist in the event queue at once)

Sets the propagation of the event

Consumes the event (prevents the event from continuing on its propagation path)

Trait Implementations

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.