Trait piston::event::GenericEvent [−] [src]

pub trait GenericEvent {
    fn event_id(&self) -> EventId;
    fn with_args<F, U>(&'a self, f: F) -> U where F: FnMut(&Any + 'static) -> U;
    fn from_args(event_id: EventId, any: &Any + 'static, old_event: &Self) -> Option<Self>;
}

Implemented by all events

Required Methods

fn event_id(&self) -> EventId

The id of this event.

fn with_args<F, U>(&'a self, f: F) -> U where F: FnMut(&Any + 'static) -> U

Calls closure with table

fn from_args(event_id: EventId, any: &Any + 'static, old_event: &Self) -> Option<Self>

Converts from table to Self

Implementors