[][src]Enum piston_window::Event

pub enum Event {
    Input(Input),
    Loop(Loop),
    Custom(EventIdArc<Any + 'static + Send + Sync>),
}

Models all events.

Variants

Input events.

Events that commonly used by event loops.

Custom event.

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

Trait Implementations

impl Clone for Event
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl CursorEvent for Event
[src]

Creates a cursor event.

Calls closure if this is a cursor event.

Returns cursor arguments.

impl UpdateEvent for Event
[src]

Creates an update event.

Calls closure if this is an update event.

Creates an update event with delta time.

Returns update arguments.

impl Into<Option<Input>> for Event
[src]

Performs the conversion.

impl Into<Option<Loop>> for Event
[src]

Performs the conversion.

impl MouseRelativeEvent for Event
[src]

Creates a mouse relative event.

Calls closure if this is a mouse relative event.

Returns mouse relative arguments.

impl FocusEvent for Event
[src]

Creates a focus event.

Calls closure if this is a focus event.

Returns focus arguments.

impl RenderEvent for Event
[src]

Creates a render event.

Calls closure if this is a render event.

Returns render arguments.

impl TextEvent for Event
[src]

Creates a text event.

Calls closure if this is a text event.

Returns text arguments.

impl ButtonEvent for Event
[src]

Creates a button event.

Calls closure if this is a button event.

Returns button arguments.

impl IdleEvent for Event
[src]

Creates an idle event.

Calls closure if this is an idle event.

Creates an update event with delta time.

Returns idle arguments.

impl AfterRenderEvent for Event
[src]

Creates an after render event.

Calls closure if this is an after render event.

Returns after render arguments.

impl ResizeEvent for Event
[src]

Creates a resize event.

Calls closure if this is a resize event.

Returns resize arguments.

impl MouseCursorEvent for Event
[src]

Creates a mouse cursor event.

Calls closure if this is a mouse cursor event.

Returns mouse cursor arguments.

impl ControllerAxisEvent for Event
[src]

Creates a controller axis event.

Calls closure if this is a controller axis event.

Returns controller axis arguments.

impl Debug for Event
[src]

Formats the value using the given formatter. Read more

impl CloseEvent for Event
[src]

Creates a close event from arguments.

Calls closure if this is a close event.

Returns close arguments.

impl MouseScrollEvent for Event
[src]

Creates a mouse scroll event.

Calls a closure if this is a mouse scroll event.

Returns mouse scroll arguments.

impl From<IdleArgs> for Event
[src]

Performs the conversion.

impl From<AfterRenderArgs> for Event
[src]

Performs the conversion.

impl From<RenderArgs> for Event
[src]

Performs the conversion.

impl<T> From<T> for Event where
    Input: From<T>, 
[src]

Performs the conversion.

impl From<Loop> for Event
[src]

Performs the conversion.

impl From<UpdateArgs> for Event
[src]

Performs the conversion.

impl TouchEvent for Event
[src]

Creates a touch event.

Calls closure if this is a touch event.

Returns touch arguments.

impl PartialEq<Event> for Event
[src]

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

This method tests for !=.

impl GenericEvent for Event
[src]

The id of this event.

Calls closure with arguments

Auto Trait Implementations

impl Send for Event

impl Sync for Event

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> ReleaseEvent for T where
    T: ButtonEvent
[src]

Creates a release event. Read more

Calls closure if this is a release event.

Returns release arguments.

impl<T> PressEvent for T where
    T: ButtonEvent
[src]

Creates a press event. Read more

Calls closure if this is a press event.

Returns press arguments.

impl<T> SetParameter for T
[src]

Sets value as a parameter of self.

impl<T> Erased for T
[src]

impl<T> Downcast for T where
    T: Any
[src]

Convert Box<Trait> (where Trait: Downcast) to Box<Any>. Box<Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any's vtable from &Trait's. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any's vtable from &mut Trait's. Read more