pub enum Event {
Loop(Loop),
}Expand description
Models all events.
Variants§
Loop(Loop)
Input events.
Events that commonly used by event loops.
Implementations§
Source§impl Event
impl Event
Sourcepub fn zero_dt_args() -> Self
pub fn zero_dt_args() -> Self
Creates Event from UpdateArgs with 0.0 delta time.
Trait Implementations§
Source§impl From<UpdateArgs> for Event
impl From<UpdateArgs> for Event
Source§fn from(args: UpdateArgs) -> Self
fn from(args: UpdateArgs) -> Self
Converts to this type from the input type.
Source§impl UpdateEvent for Event
impl UpdateEvent for Event
Source§fn from_update_args(args: &UpdateArgs, _old_event: &Self) -> Option<Self>
fn from_update_args(args: &UpdateArgs, _old_event: &Self) -> Option<Self>
Creates an update event.
Source§fn update<U, F>(&self, f: F) -> Option<U>where
F: FnMut(&UpdateArgs) -> U,
fn update<U, F>(&self, f: F) -> Option<U>where
F: FnMut(&UpdateArgs) -> U,
Calls closure if this is an update event.
Source§fn from_dt(dt: Float, old_event: &Self) -> Option<Self>
fn from_dt(dt: Float, old_event: &Self) -> Option<Self>
Creates an update event with delta time.
Source§fn update_args(&self) -> Option<UpdateArgs>
fn update_args(&self) -> Option<UpdateArgs>
Returns update arguments.
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more