Enum gui::UiEvent

source ·
pub enum UiEvent {
    Event(Event),
    Custom(Box<dyn Any>),
    Directed(IdBox<dyn Any>),
    Returnable(IdIdBox<dyn Any>),
    Quit,
}
Expand description

An event that the Ui can process.

Variants

Event(Event)

An Event that can be handled by a Handleable.

Custom(Box<dyn Any>)

A custom event that can contain arbitrary data.

Directed(IdBox<dyn Any>)

A custom event directed to a certain widget.

This custom event is destined for a particular widget, described by the given Id. That is the only widget that will receive the event.

Returnable(IdIdBox<dyn Any>)

A custom event that is guaranteed to be returned back to the issuer. The first Id represents the source (i.e., the widget the event will be returned to), while the second one identifies the destination (the widget actually “handling” the event).

Quit

A request to quit the application has been made.

Trait Implementations

Formats the value using the given formatter. Read more

A convenience conversion from Event to UiEvent.

Converts to this type from the input type.

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

Returns the argument unchanged.

Calls U::from(self).

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

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.