[][src]Trait piston_window::IdleEvent

pub trait IdleEvent {
    fn from_idle_args(args: &IdleArgs, old_event: &Self) -> Option<Self>;
fn idle<U, F>(&self, f: F) -> Option<U>
    where
        F: FnMut(&IdleArgs) -> U
; fn from_dt(dt: f64, old_event: &Self) -> Option<Self> { ... }
fn idle_args(&self) -> Option<IdleArgs> { ... } }

When background tasks should be performed

Required methods

fn from_idle_args(args: &IdleArgs, old_event: &Self) -> Option<Self>

Creates an idle event.

fn idle<U, F>(&self, f: F) -> Option<U> where
    F: FnMut(&IdleArgs) -> U, 

Calls closure if this is an idle event.

Loading content...

Provided methods

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.

Loading content...

Implementors

impl IdleEvent for Event[src]

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

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

Loading content...