Trait piston::input::GenericEvent
[−]
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 arguments
fn from_args(event_id: EventId, any: &Any + 'static, old_event: &Self) -> Option<Self>
Converts from arguments to Self
Implementors
impl GenericEvent for Input
impl<I> GenericEvent for Event<I> where I: GenericEvent