Struct piston_window::Events
pub struct Events { /* private fields */ }
Expand description
An event loop iterator
Warning: Because the iterator polls events from the window back-end, it must be used on the same thread as the window back-end (usually main thread), unless the window back-end supports multi-thread event polling.
Implementations
Trait Implementations
impl EventLoop for Events
impl EventLoop for Events
fn get_event_settings(&self) -> EventSettings
fn get_event_settings(&self) -> EventSettings
Returns event loop settings.
fn set_event_settings(&mut self, settings: EventSettings)
fn set_event_settings(&mut self, settings: EventSettings)
Sets event loop settings.
fn set_ups_reset(&mut self, frames: u64)
fn set_ups_reset(&mut self, frames: u64)
The number of delayed updates before skipping them to catch up.
When set to
0
, it will always try to catch up. Read morefn ups_reset(self, frames: u64) -> Self
fn ups_reset(self, frames: u64) -> Self
The number of delayed updates before skipping them to catch up.
When set to
0
, it will always try to catch up. Read morefn set_max_fps(&mut self, frames: u64)
fn set_max_fps(&mut self, frames: u64)
The maximum number of frames per second Read more
fn set_swap_buffers(&mut self, enable: bool)
fn set_swap_buffers(&mut self, enable: bool)
Enable or disable automatic swapping of buffers.
fn swap_buffers(self, enable: bool) -> Self
fn swap_buffers(self, enable: bool) -> Self
Enable or disable automatic swapping of buffers.
fn set_bench_mode(&mut self, enable: bool)
fn set_bench_mode(&mut self, enable: bool)
Enable or disable benchmark mode.
When enabled, it will render and update without sleep and ignore input.
Used to test performance by playing through as fast as possible.
Requires
lazy
to be set to false
. Read morefn bench_mode(self, enable: bool) -> Self
fn bench_mode(self, enable: bool) -> Self
Enable or disable benchmark mode.
When enabled, it will render and update without sleep and ignore input.
Used to test performance by playing through as fast as possible.
Requires
lazy
to be set to false
. Read moreimpl Copy for Events
Auto Trait Implementations
impl RefUnwindSafe for Events
impl Send for Events
impl Sync for Events
impl Unpin for Events
impl UnwindSafe for Events
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more