[−]Enum piston_window::Event
Models all events.
Variants
Input events.
Time stamp is ignored when comparing input events for equality and order.
Loop(Loop)
Events that commonly used by event loops.
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 AfterRenderEvent for Event
fn from_after_render_args(
args: &AfterRenderArgs,
_old_event: &Event
) -> Option<Event>
args: &AfterRenderArgs,
_old_event: &Event
) -> Option<Event>
fn after_render<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&AfterRenderArgs) -> U,
F: FnMut(&AfterRenderArgs) -> U,
fn after_render_args(&self) -> Option<AfterRenderArgs>
impl ButtonEvent for Event
fn from_button_args(args: ButtonArgs, old_event: &Event) -> Option<Event>
fn button<U, F>(&self, f: F) -> Option<U> where
F: FnMut(ButtonArgs) -> U,
F: FnMut(ButtonArgs) -> U,
fn button_args(&self) -> Option<ButtonArgs>
impl Clone for Event
fn clone(&self) -> Event
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl CloseEvent for Event
fn from_close_args(args: &CloseArgs, old_event: &Event) -> Option<Event>
fn close<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&CloseArgs) -> U,
F: FnMut(&CloseArgs) -> U,
fn close_args(&self) -> Option<CloseArgs>
impl ControllerAxisEvent for Event
fn from_controller_axis_args(
args: ControllerAxisArgs,
old_event: &Event
) -> Option<Event>
args: ControllerAxisArgs,
old_event: &Event
) -> Option<Event>
fn controller_axis<U, F>(&self, f: F) -> Option<U> where
F: FnMut(ControllerAxisArgs) -> U,
F: FnMut(ControllerAxisArgs) -> U,
fn controller_axis_args(&self) -> Option<ControllerAxisArgs>
impl CursorEvent for Event
fn from_cursor(cursor: bool, old_event: &Event) -> Option<Event>
fn cursor<U, F>(&self, f: F) -> Option<U> where
F: FnMut(bool) -> U,
F: FnMut(bool) -> U,
fn cursor_args(&self) -> Option<bool>
impl Debug for Event
impl FocusEvent for Event
fn from_focused(focused: bool, old_event: &Event) -> Option<Event>
fn focus<U, F>(&self, f: F) -> Option<U> where
F: FnMut(bool) -> U,
F: FnMut(bool) -> U,
fn focus_args(&self) -> Option<bool>
impl<T> From<(T, Option<u32>)> for Event where
Input: From<T>,
Input: From<T>,
impl From<AfterRenderArgs> for Event
fn from(args: AfterRenderArgs) -> Event
impl From<IdleArgs> for Event
impl From<Loop> for Event
impl From<RenderArgs> for Event
fn from(args: RenderArgs) -> Event
impl<T> From<T> for Event where
Input: From<T>,
Input: From<T>,
impl From<UpdateArgs> for Event
fn from(args: UpdateArgs) -> Event
impl GenericEvent for Event
fn event_id(&self) -> EventId
fn with_args<F, U>(&'a self, f: F) -> U where
F: FnMut(&(dyn Any + 'static)) -> U,
F: FnMut(&(dyn Any + 'static)) -> U,
fn time_stamp(&self) -> Option<u32>
impl IdleEvent for Event
fn from_idle_args(args: &IdleArgs, _old_event: &Event) -> Option<Event>
fn idle<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&IdleArgs) -> U,
F: FnMut(&IdleArgs) -> U,
fn from_dt(dt: f64, old_event: &Self) -> Option<Self>
fn idle_args(&self) -> Option<IdleArgs>
impl Into<Option<Input>> for Event
impl Into<Option<Loop>> for Event
impl MouseCursorEvent for Event
fn from_pos(pos: [f64; 2], old_event: &Event) -> Option<Event>
fn mouse_cursor<U, F>(&self, f: F) -> Option<U> where
F: FnMut([f64; 2]) -> U,
F: FnMut([f64; 2]) -> U,
fn mouse_cursor_args(&self) -> Option<[f64; 2]>
impl MouseRelativeEvent for Event
fn from_pos(pos: [f64; 2], old_event: &Event) -> Option<Event>
fn mouse_relative<U, F>(&self, f: F) -> Option<U> where
F: FnMut([f64; 2]) -> U,
F: FnMut([f64; 2]) -> U,
fn mouse_relative_args(&self) -> Option<[f64; 2]>
impl MouseScrollEvent for Event
fn from_pos(pos: [f64; 2], old_event: &Event) -> Option<Event>
fn mouse_scroll<U, F>(&self, f: F) -> Option<U> where
F: FnMut([f64; 2]) -> U,
F: FnMut([f64; 2]) -> U,
fn mouse_scroll_args(&self) -> Option<[f64; 2]>
impl PartialEq<Event> for Event
impl PartialOrd<Event> for Event
fn partial_cmp(&self, other: &Event) -> Option<Ordering>
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl RenderEvent for Event
fn from_render_args(args: &RenderArgs, _old_event: &Event) -> Option<Event>
fn render<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&RenderArgs) -> U,
F: FnMut(&RenderArgs) -> U,
fn render_args(&self) -> Option<RenderArgs>
impl ResizeEvent for Event
fn from_resize_args(args: &ResizeArgs, old_event: &Event) -> Option<Event>
fn resize<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&ResizeArgs) -> U,
F: FnMut(&ResizeArgs) -> U,
fn resize_args(&self) -> Option<ResizeArgs>
impl TextEvent for Event
fn from_text(text: &str, old_event: &Event) -> Option<Event>
fn text<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&str) -> U,
F: FnMut(&str) -> U,
fn text_args(&self) -> Option<String>
impl TouchEvent for Event
fn from_touch_args(args: &TouchArgs, old_event: &Event) -> Option<Event>
fn touch<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&TouchArgs) -> U,
F: FnMut(&TouchArgs) -> U,
fn touch_args(&self) -> Option<TouchArgs>
impl UpdateEvent for Event
fn from_update_args(args: &UpdateArgs, _old_event: &Event) -> Option<Event>
fn update<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&UpdateArgs) -> U,
F: FnMut(&UpdateArgs) -> U,
fn from_dt(dt: f64, old_event: &Self) -> Option<Self>
fn update_args(&self) -> Option<UpdateArgs>
Auto Trait Implementations
impl !RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> PressEvent for T where
T: ButtonEvent,
T: ButtonEvent,
fn from_button(button: Button, old_event: &T) -> Option<T>
fn press<U, F>(&self, f: F) -> Option<U> where
F: FnMut(Button) -> U,
F: FnMut(Button) -> U,
fn press_args(&self) -> Option<Button>
impl<T> ReleaseEvent for T where
T: ButtonEvent,
T: ButtonEvent,
fn from_button(button: Button, old_event: &T) -> Option<T>
fn release<U, F>(&self, f: F) -> Option<U> where
F: FnMut(Button) -> U,
F: FnMut(Button) -> U,
fn release_args(&self) -> Option<Button>
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,