[]Enum piston::Event

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

Models all events.

Variants

Input(InputOption<u32>)

Input events.

Time stamp is ignored when comparing input events for equality and order.

Loop(Loop)

Events that commonly used by event loops.

Custom(EventIdArc<dyn Any + 'static + Send + Sync>, Option<u32>)

Custom event.

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

When comparing partial order of two custom events, the event ids are checked and if they are equal it returns None.

Time stamp is ignored both when comparing custom events for equality and order.

Trait Implementations

impl MouseScrollEvent for Event

fn mouse_scroll_args(&self) -> Option<[f64; 2]>

Returns mouse scroll arguments.

impl TouchEvent for Event

fn touch_args(&self) -> Option<TouchArgs>

Returns touch arguments.

impl CloseEvent for Event

fn close_args(&self) -> Option<CloseArgs>

Returns close arguments.

impl Clone for Event

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl TextEvent for Event

fn text_args(&self) -> Option<String>

Returns text arguments.

impl PartialEq<Event> for Event

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Debug for Event

impl ButtonEvent for Event

fn button_args(&self) -> Option<ButtonArgs>

Returns button arguments.

impl CursorEvent for Event

fn cursor_args(&self) -> Option<bool>

Returns cursor arguments.

impl UpdateEvent for Event

fn from_dt(dt: f64, old_event: &Self) -> Option<Self>

Creates an update event with delta time.

fn update_args(&self) -> Option<UpdateArgs>

Returns update arguments.

impl RenderEvent for Event

fn render_args(&self) -> Option<RenderArgs>

Returns render arguments.

impl ControllerAxisEvent for Event

fn controller_axis_args(&self) -> Option<ControllerAxisArgs>

Returns controller axis arguments.

impl PartialOrd<Event> for Event

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl MouseRelativeEvent for Event

fn mouse_relative_args(&self) -> Option<[f64; 2]>

Returns mouse relative arguments.

impl GenericEvent for Event

impl FocusEvent for Event

fn focus_args(&self) -> Option<bool>

Returns focus arguments.

impl ResizeEvent for Event

fn resize_args(&self) -> Option<ResizeArgs>

Returns resize arguments.

impl Into<Option<Loop>> for Event

impl Into<Option<Input>> for Event

impl From<Loop> for Event

impl From<RenderArgs> for Event

impl<T> From<T> for Event where
    Input: From<T>, 

impl From<UpdateArgs> for Event

impl From<IdleArgs> for Event

impl From<AfterRenderArgs> for Event

impl<T> From<(T, Option<u32>)> for Event where
    Input: From<T>, 

impl AfterRenderEvent for Event

fn after_render_args(&self) -> Option<AfterRenderArgs>

Returns after render arguments.

impl IdleEvent for Event

fn from_dt(dt: f64, old_event: &Self) -> Option<Self>

Creates an update event with delta time.

fn idle_args(&self) -> Option<IdleArgs>

Returns idle arguments.

impl MouseCursorEvent for Event

fn mouse_cursor_args(&self) -> Option<[f64; 2]>

Returns mouse cursor arguments.

Auto Trait Implementations

impl Sync for Event

impl Send for Event

impl Unpin for Event

impl !RefUnwindSafe for Event

impl !UnwindSafe for Event

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> ReleaseEvent for T where
    T: ButtonEvent

fn release_args(&self) -> Option<Button>

Returns release arguments.

impl<T> PressEvent for T where
    T: ButtonEvent

fn press_args(&self) -> Option<Button>

Returns press arguments.