Enum input::Event

source ·
pub enum Event {
    Input(Input),
    Loop(Loop),
    Custom(EventIdArc<dyn Any + Send + Sync>),
}
Expand description

Models all events.

Variants§

§

Input(Input)

Input events.

§

Loop(Loop)

Events that commonly used by event loops.

§

Custom(EventIdArc<dyn Any + Send + Sync>)

Custom event.

When comparing two custom events for equality, they always return false.

Trait Implementations§

Creates an after render event.
Calls closure if this is an after render event.
Returns after render arguments.
Creates a button event.
Calls closure if this is a button event.
Returns button arguments.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Creates a close event from arguments.
Calls closure if this is a close event.
Returns close arguments.
Creates a controller axis event.
Calls closure if this is a controller axis event.
Returns controller axis arguments.
Creates a cursor event.
Calls closure if this is a cursor event.
Returns cursor arguments.
Formats the value using the given formatter. Read more
Creates a focus event.
Calls closure if this is a focus event.
Returns focus arguments.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
The id of this event.
Calls closure with arguments
Creates an idle event.
Calls closure if this is an idle event.
Creates an update event with delta time.
Returns idle arguments.
Converts this type into the (usually inferred) input type.
Converts this type into the (usually inferred) input type.
Creates a mouse cursor event.
Calls closure if this is a mouse cursor event.
Returns mouse cursor arguments.
Creates a mouse relative event.
Calls closure if this is a mouse relative event.
Returns mouse relative arguments.
Creates a mouse scroll event.
Calls a closure if this is a mouse scroll event.
Returns mouse scroll arguments.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Creates a render event.
Calls closure if this is a render event.
Returns render arguments.
Creates a resize event.
Calls closure if this is a resize event.
Returns resize arguments.
Creates a text event.
Calls closure if this is a text event.
Returns text arguments.
Creates a touch event.
Calls closure if this is a touch event.
Returns touch arguments.
Creates an update event.
Calls closure if this is an update event.
Creates an update event with delta time.
Returns update arguments.

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.