[][src]Enum input::Event

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

Models all events.

Variants

Input(InputOption<TimeStamp>)

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 + Send + Sync>, Option<TimeStamp>)

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 ControllerAxisEvent for Event[src]

fn controller_axis_args(&self) -> Option<ControllerAxisArgs>[src]

Returns controller axis arguments.

impl MouseCursorEvent for Event[src]

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

Returns mouse cursor arguments.

impl MouseRelativeEvent for Event[src]

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

Returns mouse relative arguments.

impl MouseScrollEvent for Event[src]

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

Returns mouse scroll arguments.

impl GenericEvent for Event[src]

impl AfterRenderEvent for Event[src]

fn after_render_args(&self) -> Option<AfterRenderArgs>[src]

Returns after render arguments.

impl ButtonEvent for Event[src]

fn button_args(&self) -> Option<ButtonArgs>[src]

Returns button arguments.

impl CloseEvent for Event[src]

fn close_args(&self) -> Option<CloseArgs>[src]

Returns close arguments.

impl CursorEvent for Event[src]

fn cursor_args(&self) -> Option<bool>[src]

Returns cursor arguments.

impl FocusEvent for Event[src]

fn focus_args(&self) -> Option<bool>[src]

Returns focus arguments.

impl IdleEvent for Event[src]

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

Creates an update event with delta time.

fn idle_args(&self) -> Option<IdleArgs>[src]

Returns idle arguments.

impl RenderEvent for Event[src]

fn render_args(&self) -> Option<RenderArgs>[src]

Returns render arguments.

impl ResizeEvent for Event[src]

fn resize_args(&self) -> Option<ResizeArgs>[src]

Returns resize arguments.

impl TextEvent for Event[src]

fn text_args(&self) -> Option<String>[src]

Returns text arguments.

impl TouchEvent for Event[src]

fn touch_args(&self) -> Option<TouchArgs>[src]

Returns touch arguments.

impl UpdateEvent for Event[src]

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

Creates an update event with delta time.

fn update_args(&self) -> Option<UpdateArgs>[src]

Returns update arguments.

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

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

impl PartialEq<Event> for Event[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Clone for Event[src]

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

Performs copy-assignment from source. Read more

impl PartialOrd<Event> for Event[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.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) -> bool
1.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) -> bool
1.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) -> bool
1.0.0[src]

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

impl From<RenderArgs> for Event[src]

impl From<AfterRenderArgs> for Event[src]

impl From<UpdateArgs> for Event[src]

impl From<IdleArgs> for Event[src]

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

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

impl From<Loop> for Event[src]

impl Debug for Event[src]

Auto Trait Implementations

impl Send for Event

impl Sync 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]